J
JB
Hi All,
I'm writing XML in VB.NET 2005 using the System.Xml.XmlWriter 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.WriteStartElement("Name")
oObject.WriteXml(Writer) 'This object writes it's ow
Writer.WriteEndElement("Name")
The XML produced is (on 3 lines):
<Name>
<CField FieldType="String">Query 2</CField>
</Name>
I would like to get the same XML but on 1 line:
<Name><CField FieldType="String">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.XmlWriter 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.WriteStartElement("Name")
oObject.WriteXml(Writer) 'This object writes it's ow
Writer.WriteEndElement("Name")
The XML produced is (on 3 lines):
<Name>
<CField FieldType="String">Query 2</CField>
</Name>
I would like to get the same XML but on 1 line:
<Name><CField FieldType="String">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