G
Guest
Hi, can anyone tell me
1) what is a easy way to build a xml fragment into a string. I don't what
the fragment to be written to file, just in a string will be fine.
I can build the xml fragment with the xmlTextWriter, but I don't want to
write to a file. But using methods like WriteStartElement,
WriteAttributeString is very handy.
Of course I can build the string with the stringbuilder but this is not a
xml-friendly and secure way. The xml fragment will be something like:
<houses>
<house houseid="1" typeid="2" />
<house houseid="2" typeid="3" />
</vakken>
2) I even don't want a "<?xml version="1.0"?>" line. How to suppress this?
Can someone advice me?
VS2005-VB.NET
Regards Coen.
1) what is a easy way to build a xml fragment into a string. I don't what
the fragment to be written to file, just in a string will be fine.
I can build the xml fragment with the xmlTextWriter, but I don't want to
write to a file. But using methods like WriteStartElement,
WriteAttributeString is very handy.
Of course I can build the string with the stringbuilder but this is not a
xml-friendly and secure way. The xml fragment will be something like:
<houses>
<house houseid="1" typeid="2" />
<house houseid="2" typeid="3" />
</vakken>
2) I even don't want a "<?xml version="1.0"?>" line. How to suppress this?
Can someone advice me?
VS2005-VB.NET
Regards Coen.