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

Is it possible to set an attribute's default value to a other attribute's value in XSD?

Suppose I have an XML like this: What I'd like is to define in the XSD is that the default value of attribute b should be the value of attribute a. Is that possible? Thanks in advance!
rlegendi
  • 10,466
  • 3
  • 38
  • 50
0
votes
2 answers

How to deserialize xml ignoring differences in node types(i.e whether XmlElement or XmlAttribute)

How do you deserialize xml ignoring difference in node types, that is whether a member is represented as an XmlElement or as an XmlAttribute. For example, I have this source xml Introduction to c# John…
0
votes
1 answer

SQL XML select multiple attributes

i just need your help. I was looking for a solution, but nothing works yet. I have to select multiple attributes from the xml-file which is stored in a column of my table. This is the File:
user1463983
  • 1
  • 1
  • 1
0
votes
1 answer

Using XMLSerializer to add attributes to a Class Member

I am attempting to write a WCF service which uses XmlSerialzer to output the xml. I need a specific xml output which is why I am not using DataContract Seriailzer. Specifically I am writing a catalogue service web(csw) which has a defined schema…
Euston
  • 81
  • 2
  • 10
0
votes
1 answer

Is there any way for my class to support serialisation as an XML attribute?

I have a custom class that only has one property of type string. Attempting to serialise an object of this class as an attribute using XmlSerializer results in the exception: XmlAttribute/XmlText cannot be used to encode complex types Now I know I…
GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103
0
votes
1 answer

How to force writing of an XML attribute when it is equal to the default in the XSD (.Net C#)

I have an XSD with the following type defined:
Spence
  • 28,526
  • 15
  • 68
  • 103
-1
votes
1 answer

How to retrieve the attribute values from the tags in XML File

Edit: Updated the XML file Requirement: Need to read attribute name value from all the tag. Sample XML FIle:
-1
votes
1 answer

Read XML Value By Attribute Name

Mr. Robert S/O. John 01/01/1985
ViKu
  • 235
  • 2
  • 14
-1
votes
1 answer

RegEx Notepad++: add quotes to XML attribute values using find replace

I have an XML file with no double quotes to the attribute values. The following is a sample. As you can see, these are the possible values and I tried using the regex *=\s*([^" >]+) and replace with ="\1" which works for the most part but it has…
KKR
  • 79
  • 8
-1
votes
2 answers

Thick line separating two views in android

I want this: I have this: I tried using elevation attribute but to no avail.
user5949689
  • 101
  • 2
  • 8
-1
votes
1 answer

Nested SimpleXML Attributes To Associative Array

I am integrating a payment gateway into a website and their API is returning an xml object where the values I require are nested. SimpleXMLElement Object ( [form] => SimpleXMLElement Object ( [input] => Array …
Jamesil
  • 173
  • 1
  • 5
  • 17
-1
votes
1 answer

Compare two XML attributes with same name in two different XML files using Java

I have an XML with attributes and elements/tags. I want to know whether using an attribute or a tag is good according to performance. Could you please give an example to compare if the content has a child tag and also if the content has a…
swetha
  • 449
  • 7
  • 20
-2
votes
1 answer

setAttribute doesn't affect toString of containing element

This prints 100 WOWs, but not a single WOW in the toString. Why? for my $node ( $body->findnodes('//a') ) { $node->setAttribute( 'href', "WOW" ); } for my $node ( $body->findnodes('//a') ) { print $node->getAttribute('href'); } print…
Dan Jacobson
  • 490
  • 3
  • 14
-2
votes
1 answer

possible values for android:inputMethod="" in xml for EditText

I know that android:inputMethod="" is deprecated but still can any one give me the example values. Specially When we have our own keyboard with own inputmethod. I tried with many ways but each time it crashed.
-2
votes
1 answer

JSON.NET DeserializeXmlNode to XML Attributes

how can i convert JSON to XML using JSON.NET like this: {Data : [{s1 :3, s2 :4}, {s1 :1, s2:9}]} to
Saif
  • 13
  • 1
  • 3
1 2 3
21
22