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
1
vote
2 answers

Find a node that does not contain an attribute?

The creator of an XML document that I'm running XQuery commands on left the lang attribute out of titles in titled sales materials (books, records, CD's, etc.) that are in English, making it difficult to locate English titles. I'm looking for a way…
Wolfpack'08
  • 3,982
  • 11
  • 46
  • 78
1
vote
2 answers

']object properties are not serialized as attributes using c#

A simple pesron class with nested children class. Alll the properties are attributed and igonred the private field. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",…
Rishi
  • 33
  • 6
1
vote
1 answer

XMLAttribute equivalent for DataContractSerialization?

I'm looking at converting a class that we currently serialize/deserialize with XMLSerializer to use the DataContractSerializer. The main reason I'm looking to switch is because of the OnDeserialized callback functionality you get with the…
lhan
  • 4,585
  • 11
  • 60
  • 105
1
vote
1 answer

Differentiate Tag Name and attribute "name" XML PowerShell

I have an XML input as shown below:
109F2AEA-6D9C-4127-963A-9C71D4155C5D
RinoTom
  • 2,278
  • 2
  • 26
  • 40
1
vote
4 answers

XmlAttribute / XmlElement in Interface (Element Name not changed when Serialized) - Why?

When I add an "XmlAttribute/XmlElement" to a property in an Interface and 100 other classes inherit from this interface, when Serializing the object to XML - why doesn't the attributename I entered show up in the XML file after…
Deukalion
  • 2,516
  • 9
  • 32
  • 50
0
votes
1 answer

Need to used different element name in my xml file

I have an XML class inside a .NET 3.5 project which is the top level of the XML file to be generated. I want the element it creates to have a different name called "PersonalAddresses" instead of "Addresses". I get an error when I try to add an…
user31673
  • 13,245
  • 12
  • 58
  • 96
0
votes
2 answers

How to mark up your C# object to Deserialize this XML

I can't believe how unbelievably complicated this has been... I have the following XML...
matt_dev
  • 5,176
  • 5
  • 33
  • 44
0
votes
1 answer

using restriction base in XML Schemas on attributes

I need to put a restriction onto an attribute of "yes or no" - but not too sure of how to structure it - I'm trying the below but not sure how right or wrong it is: (advice would be appreciated) thanks
nevermind
  • 137
  • 2
  • 10
0
votes
1 answer

XSLT 2.0 template matching - strip all attributes which are not in the desired namespace

I have an XML with differently namespaced attributes - it's basicly a kind of extended XHTML. I want to dump all the non-xhtml namespaced attributes. Examplary source XML:

blah

Alp
  • 29,274
  • 27
  • 120
  • 198
0
votes
1 answer

Reading xml and lookup in controller?

I have a sample xml
KeenUser
  • 5,305
  • 14
  • 41
  • 62
0
votes
2 answers

Instruct XmlSerializer to process serialized/deserialized data?

I have an enum property. I want the serialized XML for this property to be the splitted camel-case string of the enum and vice versa. I have two functions, one is ConcatCamelCase and the other is SplitCamelCase, I want the serializer to use them…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
0
votes
1 answer

How to update an attribute value in same date format

I want to change the publicationDateTime="2023-07-31T07:02:59+00:00" attribute. My xml is
Sudarshan kumar
  • 1,503
  • 4
  • 36
  • 83
0
votes
0 answers

XML Array Element not assigning Attributes when deserialising (C#)

I have a pre-existing XML structure which I want deserialised into C#. The structure of the file is:
Thomas Slade
  • 129
  • 9
0
votes
1 answer

Remove XML element attribute with namespace

I want to remove an attribute of a specific element, which includes a namespace. In the following element: I want to remove xsi:nil="true" in order to add a value to the element, Country Code in later…
0
votes
2 answers

How to add multiple XML element to an existing text in a XML file with python

I have a problem with some values not being declared as XML elements in my XML files. But for further processing, I need them to be an element. Example: Lore 9 12.34 Ipsum
JME
  • 27
  • 4