Xml writing
-
I Google my problem but not succeed can anybody guide me how can i write xml like following...
this is sample
How can i write the first line. When I put it into
writer.WriteStartElement("Parent xmlns=\"http://www.example.org\"");
then it produce output like this
parent xmlns="http://www.example.org">
/parent xmlns="http://www.example.org">
/pre>How can I write the first line.....
I don't know how I will do it.
-
I Google my problem but not succeed can anybody guide me how can i write xml like following...
this is sample
How can i write the first line. When I put it into
writer.WriteStartElement("Parent xmlns=\"http://www.example.org\"");
then it produce output like this
parent xmlns="http://www.example.org">
/parent xmlns="http://www.example.org">
/pre>How can I write the first line.....
I don't know how I will do it.
Hi, try this:
writer.WriteStartElement("Parent");
writer.WriteAttributeString("xmlns", "", null, "http://www.example.org");
writer.WriteElementString("this is sample");
writer.WriteEndElement();Take a look at this site: http://msdn.microsoft.com/de-de/library/system.xml.xmltextwriter(VS.80).aspx[^] Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
Hi, try this:
writer.WriteStartElement("Parent");
writer.WriteAttributeString("xmlns", "", null, "http://www.example.org");
writer.WriteElementString("this is sample");
writer.WriteEndElement();Take a look at this site: http://msdn.microsoft.com/de-de/library/system.xml.xmltextwriter(VS.80).aspx[^] Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
I Google my problem but not succeed can anybody guide me how can i write xml like following...
this is sample
How can i write the first line. When I put it into
writer.WriteStartElement("Parent xmlns=\"http://www.example.org\"");
then it produce output like this
parent xmlns="http://www.example.org">
/parent xmlns="http://www.example.org">
/pre>How can I write the first line.....
I don't know how I will do it.
Try replacing your **<**s with **<**s in the post - then we'll be able to see the html you're trying to achieve!
Help me! I'm turning into a grapefruit! Buzzwords!