Questions tagged [xml-attribute]

xml attributes deliver additional information about xml elements/tags.

xml attributes are name/value pairs delimited by equal sign and where the value is enclosed with quotes:

<element  attribute="value"/>

Usually the same information can be provided with sub-elements:

<element>
  <attribute>value</attribute>
</elemenbt>

Links:

317 questions
0
votes
1 answer

How to insert multiple attributes to an element node with Xquery?

How is each individual writer given a distinct attribute, so that one of the examples below would have multiple write attribute nodes? desired output:
0
votes
2 answers

How to use Xpath and Xquery to extract text() from an attribute?

Trying to query e-mail addresses using xpath and xquery but am not getting any results when simple query: xquery version "3.1"; for $contact in db:open("sample") return $contact data:
0
votes
1 answer

How do I get multiple value of single xml element while deserializing xml to c# object?

I am getting xml data from xml file to c# object which looks like below: Xml: 1234 dfsdfcs 5MJ1L3 Unshipped
Vatsal Patel
  • 571
  • 5
  • 11
0
votes
1 answer

Serialize class properties with their types automatically

My boss have a strange request, he wants me to add a new function to serialize and deserialize all our products classes and add in the XML file all their property's types automatically. I can't modify the classes to add new "types properties" before…
Alexus
  • 276
  • 1
  • 5
  • 22
0
votes
2 answers

Is it possible to combine explicit attributes validation and anyAttribute

Is it possible to define in XML schema that there must be some certain XML attributes, and at the same time I want to allow to extend this list in future? Here, if we have the following hypothetical part of XML declaration:
Dmitrii Lobanov
  • 4,897
  • 1
  • 33
  • 50
0
votes
3 answers

PowerShell - xpath for Case Insensitive XML attribute name

I have a XML where the attribute names can be combinations of lower-case and upper-case letters. In the below example, 'datasource' attribute can have any number of lowercase and uppercase letters. I need to fetch those nodes where the 'datasource'…
Sujeet Padhi
  • 254
  • 1
  • 20
0
votes
2 answers

Jackson XML with different element name and attributes under root tag

I'm new to Jackson XML and I have a requirement of constructing a Jackson XML with different element name and attributes but under same root element. My Expected xml output
0
votes
2 answers

Alternate option for onClick() for Radio Button in Android Studio

I have been trying to make a quizzing app using RadioGroups for each question having 4 options. I have made the app to calculate the score of the user by maintaining a pointer for both the correct and incorrect answers selected. For example, in my…
0
votes
1 answer

How to make use of Tags property of an xml node to get its information and attributes?

How would I make use of the Tags property of a node, so that I can get the attributes of an xml node? I have to display an xml tree in a Windows Form. When I click on any node, its attributes should get displayed on a list box in same form. I want…
user72731
  • 7
  • 2
0
votes
1 answer

fasterxml serialization of an attribute

I'm using fasterxml 2.9.4 per the below and trying to serialise the CurrencyAndAmount class inside a parent class as: 100000 But instead I am getting below. The documentation suggests that isAttribute is…
mba12
  • 2,702
  • 6
  • 37
  • 56
0
votes
2 answers

How to correctly access xml attributes using pugixml?

I'm new to xml, and using the pugixml documentation I haven't been able to read a node attribute to the console. The core of the issue is that I don't understand how the node accessing structure works and I haven't been able to figure it out using…
Alex
  • 1
  • 3
0
votes
2 answers

XML-Code Change Value of Node - How is the displayed Code correct?

I Need to Code an XML-File in C# using XMLDocument. I extract the desired XML-File and only Need to insert some Elements i Need to add. The EXPECTED Output should look like this:
V.Kirsch
  • 13
  • 5
0
votes
0 answers

Add XML attribute or element to a collection element using serialization

How should my class look like to serialize to/from a XML like this xxxx xxxx xxxx
MrCalvin
  • 1,675
  • 1
  • 19
  • 27
0
votes
1 answer

How to convert xml to Java class with Jaxb?

I know there's a lot of content around here about it, but I'm not being able to accomplish a especific…
0
votes
1 answer

Apache CXF JAXB Marshaller not marshalling @XmlAttribute correctly

I am trying to get an XML response from my CXF version 3.1 based REST service in java in the following format. I have defined my…
Dhiraj
  • 1