all groups > dotnet xml > december 2005 >
You're in the

dotnet xml

group:

Multiple namespaces


Multiple namespaces Curious
12/23/2005 6:04:55 AM
dotnet xml:
Hi,

Is it possible to write the following with the use of XML? How?
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">

Can someone help me out.
Thanks in Advance
Re: Multiple namespaces Martin Honnen
12/23/2005 3:55:26 PM


[quoted text, click to view]


[quoted text, click to view]

That is a start tag of an element with local name RDF, prefix rdf bound
to the namespace URI http://www.w3.org/1999/02/22-rdf-syntax-ns# and an
additional namespace declaration.

If you wanted to write that with an XmlTextWriter in .NET then you could use

xmlWriter.WriteStartElement("rdf", "RDF",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
xmlWriter.WriteAttributeString("xmlns", "cd", null,
"http://www.recshop.fake/cd#");

--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button