Questions tagged [default-namespace]

XML namespace declared with no prefix, for example, `xmlns="some-uri-here"`.

declared with no prefix, for example, xmlns="some-uri-here".

Default namespace applied implicitly to elements without prefix (unprefixed elements?) i.e when default namespace declared in an unprefixed element, then that element is considered in the default namespace. Descendant elements without prefix also inherits default namespace from its ancestor. In case of multiple default namespace found among ancestor elements, default namespace from the nearest ancestor is applied.


This tag was created originally because many questions, in various programming language and platform, has been asked where the root cause of OP's confusion is the same: existence of default namespace. But even so, whenever new question comes, it isn't easy to find a good older duplicate question.

19 questions
0
votes
2 answers

Get Child Node value using parent Node in XML

How to Get the Value of the node by using the parent tag name. Here is my XML format. Order Id
rAm
  • 199
  • 2
  • 19
0
votes
1 answer

Sql Server XQuery value() not working

I have been working for some time now on XQUERY but somehow I am stuck at this simple yet weird problem. Following is my query : DECLARE @VALUE_XML XML ='
Vikas Kumar
  • 87
  • 2
  • 18
0
votes
1 answer

What is the syntax for accessing child nodes using System.Xml.XmlDocument.SelectNodes with a namespace?

Given the following XML: 2014-12-03T13:58:05.5136628 ABCCORP\jsmith
Matthew S
  • 900
  • 3
  • 12
  • 26
0
votes
1 answer

Use XPath with XML namespace

I want to process the xml below with XPath:
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
1
2