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
2
votes
0 answers

Serialization - XmlAttribute - DefaultValue for List

[Serializable] public class ListGroups { public ListGroups() { this.MyList = new List(); } [XmlAttribute("mylist"), DefaultValue(typeof(List), "")] public List MyList { get; set; } …
nymezide
  • 21
  • 1
2
votes
1 answer

Speed efficiency - R for loop

The following code is being used to parse XML in order to extract information like node, parent, type and so on into a data frame. It works fine for a small XML file of lines but when a file of greater than 25,000 lines is used it takes a couple of…
2
votes
1 answer

Is there a way to make a serialized member to serialize as an attribute?

Is there a way to make a serialized member to serialize as an attribute: Public Class Person Public Property Name As String End Class I want than when this class is xml-serialized, it should produce:
2
votes
2 answers

XML format in oracle

I am looking for an XML output like this: 200 1 4 I am struggling to get the same format as…
Tina
  • 53
  • 1
  • 9
2
votes
1 answer

Return element value in same path as other elements with same name

I am currently developing a parser that reads xml and returns specific values into documents. I have a strange bit of XML that I am not sure how to deal with. Here is an example:
a.hrdie
  • 716
  • 2
  • 14
  • 35
2
votes
2 answers

JAXB marshalling for function with arguments

Is it possible to use JAXB to create an XML attribute from a function that includes a parameter? I'd like to do something like this: @XmlRootElement public class App { @XmlAttribute public boolean isOwned( User user ) { return…
derekerdmann
  • 17,696
  • 11
  • 76
  • 110
2
votes
2 answers

How to reference an attribute in xsd

I tried to define an attribute that could be referenced in subsequent element definitions. Later I use it like this: