Hi All,
I'm writing XML in VB.NET 2005 using the System.Xml.XmlW riter class.
It's all working fine but I'd like to remove a few NewLine characters.
For instance if I use the following code:
Writer.WriteSta rtElement("Name ")
oObject.WriteXm l(Writer) 'This object writes it's ow
Writer.WriteEnd Element("Name")
The XML produced is (on 3 lines):
<Name>
<CField FieldType="Stri ng">Query 2</CField>
</Name>
I would like to get the same XML but on 1 line:
<Name><CField FieldType="Stri ng">Some Name</CField></Name>
I tried to use the WriteRaw method of the XmlWriter class, it works
but it requires handling the alignment manually which can become a bit
messy.
Any ideas on how to do that?
Thanks
JB
I'm writing XML in VB.NET 2005 using the System.Xml.XmlW riter class.
It's all working fine but I'd like to remove a few NewLine characters.
For instance if I use the following code:
Writer.WriteSta rtElement("Name ")
oObject.WriteXm l(Writer) 'This object writes it's ow
Writer.WriteEnd Element("Name")
The XML produced is (on 3 lines):
<Name>
<CField FieldType="Stri ng">Query 2</CField>
</Name>
I would like to get the same XML but on 1 line:
<Name><CField FieldType="Stri ng">Some Name</CField></Name>
I tried to use the WriteRaw method of the XmlWriter class, it works
but it requires handling the alignment manually which can become a bit
messy.
Any ideas on how to do that?
Thanks
JB
Comment