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

Setting an XML attribute in the model

I need to set an attribute in my XML. I require the following: Here is my model so far [XmlAttribute("version")] [XmlType("finPOWERConnect")] public class ApplicationData { public List
CodeMonkey
  • 119
  • 4
  • 12
0
votes
0 answers

How to add special character to XmlElement attribute?

I want to add special character to XmlElement attribute. I have a class public class Sitemap { [XmlElement("loc:url")] public string Url { get; set; } } After execute Xml I have this snippet with encode…
tructran
  • 1
  • 1
0
votes
1 answer

Swift parsing attribute name for given elementName

Here is a part of my URL Новый Афон
Koka
  • 79
  • 2
  • 11
0
votes
1 answer

How to set xml class attributes to obtain the requested xml?

I have some classes and I need to obtain this xml by serialization: 123456 999
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
0
votes
1 answer

Adding attributes to xmlNode in Axapta 2012

Can we add attributes to xmlNode in Axapta 2012? If so, how do I do this? Below is my XML. I need to add an Id attribute to the node. Cannot delete the picking lists (lines)
0
votes
1 answer

How to Rename xml element attribute when serialize?

I want xml with custom name for element atrribute, I declared the name as shown below [XmlRoot(ElementName = "country")] public class CountryInRegion { [XmlElement(ElementName = "iso_code")] public string IsoCode { get; set; } …
0
votes
1 answer

Are parsed entities permitted as entity values in XML?

In a natural XML document (either 1.0 or 1.1), is it permitted to have an attribute value, which is typed as ENTITY in the DTD, to be a parsed entity? The following is a table copied from the XML spec (section 4.4), summarizing the rules for entity…
Sean B. Durkin
  • 12,659
  • 1
  • 36
  • 65
0
votes
0 answers

Sorting Elements based on Attribute Value in Java

I am trying to sort the nodes in a NodeList based on the Item ID. The Xml looks like
SMA_JAVA
  • 471
  • 4
  • 9
  • 18
0
votes
0 answers

Passing static field values to WSDL with JAX-WS

I would need to set an attribute value in the WSDL for a JAX-WS WebService. I found that this can be done using the @XmlAttribute annotation for a "public static final" field of a complex type, but how do I actually pass the value from my class to…
milin
  • 414
  • 4
  • 14
0
votes
2 answers

How to parse properties of a tag value in xml file in Android

I'm developing a weather application. The Xml file is successfully parsed. But I want to read this value. But when I get astronomy to a text feild, it returns null. But In logcat it is shows…
Isuru
  • 161
  • 1
  • 2
  • 13
0
votes
1 answer

GetNamedItem() vs. index

Is there a difference between method GetNamedItem("test") and access by index in XmlAttributeCollection? Maybe in null handling or in something else? xml_node.Attributes.GetNamedItem("test").Value; xml_node.Attributes["test"].Value;
benderto
  • 896
  • 11
  • 39
0
votes
1 answer

Xml Array Deserialization to C# object without top level arrayElement

I have the following Xml : someName
and I would like it to map the following object structure: public class Head{ public String Name {get;set;} …
Cedric Dumont
  • 1,009
  • 17
  • 38
0
votes
2 answers

How to Parse through nsXml Parser

i am very new to iphone Development and i am asked to use nsxml parser to parse xml from a google api. i have parsed another url which has xml but i am not able to parse google's because it is using id's to store data rather than inside tag.…
chsab420
  • 191
  • 2
  • 3
  • 14
0
votes
1 answer

How to add custom XML attribute elements to add entries to an XML file in android

I need to maintain an xml file to save/update/customize the configuration of application , in my project folder. I am saving the file to the 'raw' folder inside 'res'. my data inside this config file is like `
Arundas K V
  • 801
  • 2
  • 14
  • 28
0
votes
1 answer

Read xml with Dataset with xml node attributes as a part of parent table

I have this xml Francis Ferns This when being read from an DataSet reads two datables where another table gets added for the email . This is…
user581157
  • 1,327
  • 4
  • 26
  • 64