Ok another simple .NET question about namespaces

Ok,

Very simple question.....
When you read an XML document, there could be a couple of namespaces in it. Is there a simple way to retrieve those namespaces ????

 

 

Published 10-11-2004 12:09 PM by Patrick Wellink
Filed under:

Comments

# re: Ok another simple .NET question about namespaces

Monday, October 11, 2004 5:52 PM by Patrick Wellink
I have hacked together some code for a command line tool that displays all namespaces used by elements and attributes in an XML document. You can download the source and executable from here http://www.xs4all.nl/~yorrick/code/ReadOutXmlNamespaces.zip

For your convenience I have written it in C# :) It is provided "AS IS".

Usage: NamespaceReader.exe [/I | xmlfilename]

/I Read stdin
xmlfilename The filename of an XML document

# re: Ok another simple .NET question about namespaces

Monday, October 11, 2004 8:47 PM by Patrick Wellink
XmlTextReader implementeert de W3C Namespace specificatie. De namespace van de huidige node is op te vragen middels de NamespaceURI (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclassnamespaceuritopic.asp).

# re: Ok another simple .NET question about namespaces

Tuesday, October 12, 2004 11:27 AM by Patrick Wellink
thanks guys