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
1 answer

How to Deserialize XML to C# Object using XML attributes

Worked with Json until now. Now I get an XML as data source and I would like to Deserialize it into C# objects using the XML attributes. The problem, as I see it is that I would like to serialize the XML only from MSGData - so I set the DOCUMENT as…
Guy E
  • 1,775
  • 2
  • 27
  • 55
1
vote
2 answers

Maximum attribute size limit (65536) exceeds. Mulesoft

I am sending an XML payload to a webservice and capturing the response payload in dataweave transformer. For some payload data, I am getting the expected response, but for some of them, I am getting this below error. Can anyone know, how to resolve…
RV2509
  • 35
  • 10
1
vote
1 answer

Send XML attributes along with Elements via ajax to C# controller method and parse to save

Normally XML elements to get edited on web page are sent over as the input name Example : Then In C# controller method: List keys = Request.Form.Keys.Cast().Where(item => item[0] == '/' && item[1] == '/').ToList(); foreach (var key…
user9054710
1
vote
0 answers

XMLELEMENT group of attributes

we are able to generate the XML structure shown below, where the data is linear with no grouping with respect to the models.
siv ModelMasterEdit
Samir Das
  • 11
  • 1
1
vote
1 answer

Attribute "x" bound to namespace "xx" was already specified for element "xxx"

I have some test code snippet: import groovy.xml.XmlUtil import groovy.xml.StreamingMarkupBuilder class Greet { def name Greet(who) { name = who[0].toUpperCase() + who[1..-1] } def salute() { println "Hello !" def input = """ …
aolphn
  • 2,950
  • 2
  • 21
  • 30
1
vote
2 answers

How to parse XML with several Attributes and an options list

I have an XML file that looks something similar to this:
Sonhja
  • 8,230
  • 20
  • 73
  • 131
1
vote
1 answer

What is the XPath to get value if attribute is equal only to one of two possible values

Having the XML text what would be the XPath to extract the text if attribute is value1 or value2? For any other attribute value I'm expecting no match. What works for me is /node[@attribute = 'value1' or @attribute…
Michal Kordas
  • 10,475
  • 7
  • 58
  • 103
1
vote
1 answer

PHP, XML, Accessing Attributes

I'm having a some trouble accessing attributes in my XML. My code is below. Initially I had two loops and this was working with no problems. I would first get the image names and then use the second loop to get the story heading and story details.…
Stephen
  • 4,715
  • 8
  • 53
  • 78
1
vote
0 answers

Is there a way to force exact URL in XmlTypeAttribute.TypeName?

I need to implement calls to some service that provider refuses and/or is unable to give WSDL for... I have trouble with Serializing to XML. URL in XmlTypeAttribute.TypeName gets encoded. Since I got some XML examples from provider, I've tried…
Djiber
  • 55
  • 1
  • 9
1
vote
1 answer

How to unmarshal an xml enum attribute in go?

I want to parse an xml attribute as an iota enum type (int) in go. Below you can see what I tried but this does not work because the address of enum variables can't be taken. type EnumType int const ( EnumUnknown EnumType = iota EnumFoo …
David
  • 31
  • 4
1
vote
1 answer

how to serialize a property property only not the whole property using xml attributes?

I want to serialize an object that contains properties and one of these properties I want only to serialize its name. How to do this without implmeneting IXmlSerializable interface, only using attributes. [Serializable] public class Class { …
Shehab
  • 431
  • 2
  • 10
1
vote
1 answer

When to use a question mark for XML attributes?

Some XML attributes need to start its value with a question mark (?) and I just wondering how can I know these attributes, particularly these attributes, aren't shown when I press on ( CTRL + Space ) to show suggested attributes examples of these…
1
vote
1 answer

Extracting attributes from XML column in SQL Server 2012

I have a column called MetaXML, which has XML stored inside. I only want to extract information relating to the URLpanel tag. How do I access the node/element down to the URLPanel tag. I also want to separate out the Cap, CaptionText, Height,…
C J
  • 13
  • 4
1
vote
1 answer

how to read attributes of XML file via XSLT program in abap

I have an XML file as below and i need to read attribute values and fetch it to an internal table. but the values are not fetched and the internal table remains empty. Please let me know if there is anything wrong with the code . Thank you so much…
1
vote
1 answer

How to Determine XML Element's Children Based on Value of Attribute

I'm using Eclipse IDE to build an XML Schema for processing by JAXB, but I'm getting a validation error on the following:
SirKM
  • 60
  • 5