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

Map XML attribute to specified tag(field) in Jackson Xml Mapper

I have a class: public class SomeClass { public String a = "tag" @JacksonXmlProperty(isAttribute = true) public String b = "attribute" } I need to set variable b as a property of variable a:
coolsv
  • 268
  • 3
  • 17
0
votes
2 answers

Print known attributes from XML in PHP with SimpleXMLElement

Given the following XML:
TenG
  • 3,843
  • 2
  • 25
  • 42
0
votes
2 answers

What can change the order of elements' attributes in generated XML file by Java?

I use Jaxb2Marshaller and XMLStreamWriter to generate XML files from Java POJO-s from XSD. And I realized that the order of the attributes in the elements are different, if I run my application in different environments. I also realized that in my…
victorio
  • 6,224
  • 24
  • 77
  • 113
0
votes
1 answer

Fetching the XML without changing the order of the attributes

I am trying to fetch the xml from the file, but while fetching the order of the attributes are changing I know it will not matter but in my case it does, as I am hashing the document I am trying the below code but it is ordering the attributes in…
anb004
  • 11
  • 4
0
votes
1 answer

Invalid operation in Xml?

I am trying to remove attributes from an xml whose value contains certain string. This is the code I wrote, XmlDocument doc = new XmlDocument(); doc.LoadXml("
Shad
  • 1,185
  • 1
  • 12
  • 27
0
votes
0 answers

Get several XML attributes with PHP

I have this XML: keyword.domain.seo
Furin
  • 532
  • 10
  • 31
0
votes
1 answer

Xml attribute to individual element

I have requirement to convert attribute to element but below xslt code is doing it but attribute of child element is within the child element tag along with value but I want attribute values immediately after the child element not within child…
user8316430
  • 11
  • 1
  • 5
0
votes
1 answer

XML unmarshalling using JAXB, with field type based on XML attribute value?

My application receives, from another application, xml of the form: the sender 1 where Foo is any one of several…
Chris
  • 409
  • 3
  • 17
0
votes
2 answers

XML attribute with a prefix in *value* - how to tell it is a namespace prefix?

I'm writing a code that re-organizes namespaces in an arbitrary XML, potentially changing their prefixes. That was pretty straightforward until I ran into the xsi:type attribute: ... If I change the xs prefix of XSD…
Vladimir Dyuzhev
  • 18,130
  • 10
  • 48
  • 62
0
votes
1 answer

How to RESET attribute of xml element using boost::property_tree?

I have a xml file, I need to modify few attributes in that file. My xml file is something like below:
0
votes
0 answers

Deserialize XmlElement storing attribute names and values

I got an XML file with this kind of structure:
0
votes
0 answers

"No resource found that matches the given name" error when creating custom attributes

Im trying to add a custom xml attribute for my class but this error happens even if I'm not trying to use this attrubte. I just create it in res/values/attrs.xml file like this
etrusks
  • 363
  • 3
  • 12
0
votes
1 answer

Visual Studio 2008 web reference proxy class doesn't decode xml attribute

I have a following issue: I am writing client code for consumation of a web service. Here is the answer from the web service: HTTP/1.0 200 OK Content-Type: text/xml; charset=utf-8 Connection: close
Bogi
  • 2,274
  • 5
  • 26
  • 34
0
votes
0 answers

Can we get XML attributes value without specific node name through java code?

Here is my code DOMParser myparser = DOMParser.getInstance(); myparser.parse(response.trim()); Document myDoc = myparser.getDocument(); NodeList nList =…
0
votes
0 answers

How to separate the results in xml attributes

This is the sibling/attribute

Oscar
  • 1
  • 3