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
4 answers

Using PHP to extract information from attributes in XML document

I was unable to find an answer to my question after browsing some promising titles so I figured I would try my luck! I'm attempting to extract information from XML files generated from a back-end we use at work. The information is not formatted like…
notchris
  • 180
  • 10
0
votes
2 answers

Method to check uniqueness of an XML attribute value

"path1" "path2"
keerti_h
  • 383
  • 2
  • 13
0
votes
1 answer

select Attribute by value

Given this simple xml: I want to select the attribute with value = foo. This xpath works: root/child[@id='foo']/@id but it seems there should be a way to accomplish the same without…
jaco0646
  • 15,303
  • 7
  • 59
  • 83
0
votes
1 answer

ORA31011 - XML parsing Failed

I have a SQL script that Im building to make a structure, this is the oracle version Im working with "Oracle Database 10g Release 10.2.0.4.0 - 64bit Production", then this is the script: XMLELEMENT("cbc:InvoicedQuantity", xmlattributes('PEN' as…
user3095751
  • 1
  • 1
  • 1
0
votes
1 answer

Parse XML (Array with Index) to List
I have following XML File:
utf-8 1.0
Daniel Abou Chleih
  • 2,440
  • 2
  • 19
  • 31
0
votes
0 answers

[C#]XML Serialize Attribut/Element must have value

I got XMLIgnoreAttribute, VARSpecified to ignore or ignore-able value. But is there any attribute to specified must have a value ? I found this Attributes That Control XML Serialization, but nothing useful. class Test { [XMLIgnore] public…
wener
  • 7,191
  • 6
  • 54
  • 78
0
votes
1 answer

How to search a given string in XML?

I have a XML like: <1 beginIndex="0" endIndex="723"> The teddy bear is a soft toy in the form of a bear. Teddy bears are among the most popular gifts for children and are often given to adults to signify love, congratulations or…
viji
  • 119
  • 2
  • 3
  • 12
0
votes
1 answer

how to add an attribute to XML node?

if (child is WinCRLFTextArea) { var node:XML; node = <{child.name}>{WinCRLFTextArea(child).text}; textXML.appendChild(node); } I want to…
viji
  • 119
  • 2
  • 3
  • 12
0
votes
2 answers

C# XML deserialization XmlAttribute

2Let's say I have this array:
Kindzoku
  • 23
  • 1
  • 4
0
votes
1 answer

How to solve serialization ambiguity with xml attributes?

I want to serialize a valid xml with an XmlSerializer. But I got this error message: "There was an error reflecting property 'Descriptions'. ---> System.InvalidOperationException: The top XML element 'Description' from namespace…
JahManCan
  • 601
  • 3
  • 8
  • 19
0
votes
1 answer

XML Schema: single element name and type with different attributes restriction

I need to specify an XML fragment like this:
...
...
The work address is required, but the home address is optional. How can I achieve that restriction in XML Schema? This is my address…
Goran
  • 3
  • 2
0
votes
1 answer

xml output in readable format

I have the below query that returns everything in one line of the xml, is there a way to have the outpup in readable format? Like the sample below. SELECT XMLELEMENT("rss", XMLATTRIBUTES('http://www.georss.org/georss' AS…
gSaenz
  • 679
  • 6
  • 23
0
votes
2 answers

Change the attribute value of an XML Node

I am trying to change an existing attribute value of an XML Node that has child nodes. I am getting an exception when trying to do this. string specificOwnerPath = "Owners/Owner[@id='" + startingOwnerName + startingOwnerZipCode + "']"; XmlNode…
user1546315
  • 683
  • 5
  • 16
  • 27
0
votes
1 answer

Why does Go's encoding/xml.Decoder.Token() not produce xml.Attr tokens as it should?

Using encoding/xml.Decoder I'm attempting to manually parse an XML file loaded from http://www.khronos.org/files/collada_schema_1_4 For test purposes, I'm just iterating over the document printing out whatever token type is encountered: func Test (r…
metaleap
  • 2,132
  • 2
  • 22
  • 40
0
votes
2 answers

Where do I put the [XmlAttribute] attribute in c#?

I am changing some public field to private by providing corresponding public property. for example: public string Name; is change to private string _name; public string Name { get{ return _name;} set{ _name = value;} } However, what about…
Fan Jia
  • 117
  • 5