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

Query with CROSS APPLY, trying to get a field based on an attribute value

I try to get all the fields name from a form stored as XML in SQL Server, based on the value of an attribute (Culture). Actually, I can get the text value, but they are concatenated into the FieldName column. XML structure looks like this:
Jonathan Anctil
  • 1,025
  • 3
  • 20
  • 44
1
vote
1 answer

XML Time in UTC format after serialization

I have the following XSD definition: public class Test { private System.DateTime time; [System.Xml.Serialization.XmlElementAttribute(DataType = "time")] public System.DateTime Time { get { return…
Sun
  • 4,458
  • 14
  • 66
  • 108
1
vote
1 answer

WCF deserialization with XmlEnumAttribute

Enum is automatically deserialized by the WCF service. [XmlType(Namespace = "http://rca.ws.emitere/2010-11/")] public enum Animal { [System.Xml.Serialization.XmlEnumAttribute("Cat name")] Cat, …
1
vote
1 answer

Remove error code for xml attribute -- MS SQL For xml (_x003D)

I have the following sql code to generate a block of xml. SELECT top 1 'http://www.crsoftwareinc.com/xml/ns/titanium/common/v1_0' AS [xmlns], (SELECT top 1 count(*)AS 'number-of-accounts', -- -- TO DO -- FOR XML PATH('payment-import-header'),…
a ridi
  • 125
  • 2
  • 13
1
vote
4 answers

How do I remove a specific node using its attribute value in PHP XML Dom?

My question is best phrase as: Remove a child with a specific attribute, in SimpleXML for PHP except I'm not using simpleXML. I'm new to XML for PHP so I may not be doing the best way I have a xml created using the $dom->save($xml) for each…
Alv
1
vote
2 answers

Azure APIM Policy Editor

I would very much like to be able to set Azure API Policy attributes based on a User's Jwt Claims data. I have been able to set string values for things like the counter-key and increment-condition but I can't set all attributes. I imagined doing…
1
vote
1 answer

Issue handling attributes when converting JSON to XML in C#

I'm working on a service in which I pass a JSON request, I need to convert it to XML and them compare it to some XML schemas and then do something with it. My problem is with the attributes. For example, my JSON request is: { "BookingSearch_IN":…
Rolando F
  • 148
  • 3
  • 17
1
vote
1 answer

C# deserialize Xml attribute to value without wrapping it with class

I'm trying to deserialize xml below: Some title When I wrap it with class like below XmlSerializer works like charm [XmlRoot(ElementName = "venue")] public class…
Misiakw
  • 902
  • 8
  • 28
1
vote
1 answer

Transform XML elements into Attributes

I have to transform one XML file into another set suitable for specific needs. Transforming XML is not new, but transforming it dynamically from elements to Attributes is somewhat intriguing. Also there is a need to query the parent element using…
1
vote
0 answers

How to define newline in an XML ENTITY

I am trying to define an XML ENTITY that contains only a newline character ( ;). But unfortunalty this does not seem to be working: ]>
nutrina
  • 1,002
  • 1
  • 12
  • 26
1
vote
4 answers

How to use a JavaScript variable as a XHTML attributes value?

I have tried: But using FireFox, the name is set to the literal string: "&{myVar};" instead of the value of…
markmnl
  • 11,116
  • 8
  • 73
  • 109
1
vote
0 answers

"attribute missing android namespace prefix" in official code snippet from Google doc. (about optimizing Android apps for ChromeOS)

I added this line to the manifest xml file of my app, according to documentation for optimizing for ChromeOS Android app publishing but I get "Attribute is missing the…
P5music
  • 3,197
  • 2
  • 32
  • 81
1
vote
1 answer

Add attributes to rootNode when using XMLViews

I am looking for a way to add attributes for the root node when using XMLViews in CakePHP3. The Script generates a simple sitemap.xml which needs the namespace included in the urlset tag. Not to much code to show, but anyway: function…
harpax
  • 5,986
  • 5
  • 35
  • 49
1
vote
1 answer

how to add attributes to xml using xml serializer

I have the following code which will save to XML file, private bool CreateAutoGeneratedReportsXML(string ReportName, int ReportId, string ConnectionString, string ReportBQuery, string ReportColName,string starttime,string endtime,string…
Tan
  • 778
  • 3
  • 18
  • 36
1
vote
1 answer

Proper syntax for XML attributes?

I am a beginner in XML language. I am learning XML in Android studio at school. Example, in this case, all the values are hidden from…
In-young Choung
  • 779
  • 2
  • 8
  • 22