Questions tagged [xml-namespaces]

According to the standard, "XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references."

According to the standard,

XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references.

Please note that, although many XML namespaces take the form of a URL, they do not necessarily refer to a location on the Internet.

See also: What are XML Namespaces for?

2420 questions
23
votes
2 answers

How to use xmlns declarations with XPath in Nokogiri

I'm using Nokogiri::XML to parse responses from Amazon SimpleDB. The response is something like:
Mark Rendle
  • 9,274
  • 1
  • 32
  • 58
22
votes
2 answers

JSTL xmlns namespace differences between JSF 1.2 and JSF 2.x?

I have a JSF 1.2 based webapp from which I copied the JSTL import xmlns:c="http://java.sun.com/jstl/core" You can also find this import in many places on the Internet. I can't remember whether the above worked in my former web project or not, in…
Kawu
  • 13,647
  • 34
  • 123
  • 195
22
votes
4 answers

XElement is automatically adding xmlns="" to itself

I am creating a new XDocument from a table. I have to validate the document from an XSD document and it keeps failing because it add the xmlns="" to one of the Elements when it shouldn't. Here's parts of the code that are pertinent. XNamespace…
Zach
  • 329
  • 1
  • 3
  • 8
22
votes
1 answer

Find elements in a Node without the proper namespace, in Java

So I have a xml doc that I've declared here: DocumentBuilder dBuilder = dbFactory_.newDocumentBuilder(); StringReader reader = new StringReader(s); InputSource inputSource = new InputSource(reader); doc_ = dBuilder.parse(inputSource); Then I have a…
Grammin
  • 11,808
  • 22
  • 80
  • 138
22
votes
5 answers

Remove namespace from XML using PHP

I have an XML document that looks like this: ... I am parsing the information using SimpleXML in PHP. I…
jchimpo
  • 245
  • 1
  • 3
  • 7
21
votes
4 answers
21
votes
1 answer

How to declare XPath namespaces in xmlstarlet?

I am new to xmlstarlet so hoping this answer is a simple one. I am writing a script to modify Inkscape SVG files from the command line. I chose the tool xmlstarlet. After testing the command syntax on test files, I am having trouble on the real SVG…
John W
  • 561
  • 1
  • 5
  • 17
20
votes
1 answer

Must an XML namespace name URI be retrievable?

I have the following tags on my WSDL:
IUnknown
  • 9,301
  • 15
  • 50
  • 76
19
votes
1 answer

How to remove namespace from the output xml?

Below is my xsl
user475464
  • 1,741
  • 10
  • 26
  • 38
19
votes
3 answers

Java: Marshalling Object -- Removing extra ns2 annotation in xml

I am trying to marshall data within an object into an xml file based on a defined schema. However when I print out the xml file, I recieve extra annotations on the xml tags. Is there any way to get rid of the extra namespace annotation (i.e.…
user459811
  • 2,874
  • 10
  • 37
  • 63
19
votes
3 answers

Reference to undeclared namespace prefix when parsing MSXML

How do I solve the Reference to undeclared namespace prefix: '%s' problem with Microsoft's msxml implementation? I'm using an XML feed from a government web-site that contains values i need to parse. The xml contains namespaces:
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
19
votes
1 answer

unable to locate Spring NamespaceHandler error

I have been having this error for nearly a week now and im just about ready to give in. I have used Maven2 to make the BIG jar file. When I run the jar file using: java -jar someJar.jar I get this error: ERROR: [27/55/13 10:55] Launcher:…
Sagarmichael
  • 1,624
  • 7
  • 24
  • 53
19
votes
6 answers

Using XSDs with includes

Here is an XSD:
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
18
votes
2 answers

How to write namespaced element attributes with LXML?

I'm using lxml (2.2.8) to create and write out some XML (specifically XGMML). The app which will be reading it is apparently fairly fussy and wants to see a top level element with:
timday
  • 24,582
  • 12
  • 83
  • 135
18
votes
3 answers

XSL - How to remove unused namespaces from source xml?

I have an xml with a lot of unused namespaces, like this:
mdiez
  • 183
  • 1
  • 1
  • 5