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

XML best practices: planning for extensibility

I'm currently in the process of creating an XML format. I have big ideas for where I want this to go but in the beginning I would like to start small and allow for extensibility. I've done a lot of reading on the topic of XML attributes vs XML…
0
votes
1 answer

XMLAttribute is always returning false

The xmlattribute is always returning true, I need the default value set to false. Here is the code i'm using: @XmlAttribute(name = "returnInterest", required=false) protected Boolean returnInterest; public boolean isReturnInterest() { if…
0
votes
1 answer

XSL replace attribute inside richtext

I would like to change the content of a xml node. This is my source:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. …

LStrike
  • 1,598
  • 4
  • 26
  • 58
0
votes
1 answer

Name Can Be Simplified - C# - XmlAttributeAttribute Class - IDE0001

When using the XmlAttributeAttribute class in C#, I'm told that the class name XmlAttributeAttribute can be simplified to XmlAttribute. I'm unsure how this works exactly. How am I permitted to refer to a class by a shortened name? How does C# know…
0
votes
1 answer

Loading XML based on attribute value

first time poster, long time reader. I've got an XML import to write (another first), and i'm getting lost in the conflicting methods and approaches that can be adopted. The XML I'm trying to Import looks roughly like this: ...
AshLewis
  • 3
  • 3
0
votes
1 answer

How to add one common XML attribute to multiple elements

I have an object that I get back from a REST API in XML format. I can create and update this object type. In my Rest client, I want to supply an attribute with some of my elements. Let's say I can specify an attribute like access="LOCKED" to make…
Saeed
  • 319
  • 5
  • 21
0
votes
1 answer

XML Attribute modification not being saved

I have the following code: def incrCount(root): root.attrib['count'] = int(root.attrib['count']) + 1 # root.set('count', int(root.attrib['count']) + 1) root = getXMLRoot('test.xml') incrCount(root) print root.attrib['count'] when I run it,…
mjr
  • 97
  • 2
  • 11
0
votes
2 answers

Retrieve one attribute value using another attribute value in xml

I have an xml file like following
Leks
  • 77
  • 11
0
votes
1 answer

How to iterate over an xml element's direct children in javascript, saving values of specific attributes?

I am relatively new to javascipt and have discovered ajax, which I have been able to use to retrieve an xml file from a URL and find an element with a specific attribute value, but I'm unable to figure out how to iterate over the element's children,…
AlexMTMorgan
  • 67
  • 1
  • 1
  • 10
0
votes
1 answer

Avoid escaping illegal charactes when set an XmlAttribute value

The problem is when a try to set an XmlAttribute value with the '>' char. It escape with the value '>', but '>' es valid because it is into an attribute value. Example: var element = xmlDoc.CreateElement("Studient"); element.SetAttribute("Year",…
Alexander Leyva Caro
  • 1,183
  • 1
  • 12
  • 21
0
votes
0 answers

Pass String variable in @XmlAttribute name tag

My requirement is i have to set @XmlAttribute name dynamically. String nameValue="code"; @XmlAttribute(name = nameValue) //unable to set String Variable as name param protected String value; The value for annotation attribute XmlAttribute.name…
gifpif
  • 4,507
  • 4
  • 31
  • 45
0
votes
5 answers

Is it possible to use fancy fonts in Android?

I know that the TextView has an attribute called fontFamily and I thought you can change the font of the text by changing the value of this attribute. So I wrote:
Sweeper
  • 213,210
  • 22
  • 193
  • 313
0
votes
2 answers

Java - XML Parser (DOM-Parser)

I have to parse the following xml file.
0
votes
1 answer

Are both XML attributes for newer and older APIs needed?

Should I specify both XML attributes for newer and older APIs in my AndroidManifest file if the minSdk is set to API 11? If not, which one should I specify? Here is an example of using both parentActivityName attributes:
Alex
  • 1,623
  • 1
  • 24
  • 48
0
votes
3 answers

Read XML Attribute using C#

This is an example from my XML code. In C# I need to store ONLY ID'S inside of a block element in one variable, and ONLY Box's inside of a block element. I have been…
nanthil
  • 65
  • 1
  • 4
  • 11