XmlTextWriter.WriteStartElement for RootElement and overriding namespa(hockblogs.net)
submitted by
hockman(505) 2 years, 4 months ago
Hi there,
I'm having some problems with the XMLTextWriter. On MSDN it says:
Namespace Declaration Overriding with the XmlTextWriter
The following code example shows how to manually override the namespace associated with a given prefix. Notice that the order value overrides the original namespace URI of 123. This allows the namespace to be redefined in a new element scope.
Visual Basic
w.WriteStartElement("x", "node", "123")
w.WriteAttributeString("xmlns", "x", Nothing, "order")
C#
w.WriteStartElement("x","node","123");
w.WriteAttributeString("xmlns","x",null,"order");
So I used the following construction for the root element:
lXmlWriter.WriteStartElement("MyPrefix", "RootElement", null);
|category: XML
|Views: 10
tags:
XML another
Everyones tags:
Your Tags: