lee2006
19-04-2007, 12:58 PM
Hi there all
Still having problems with my XML files
I have an XML file that is updated froman asp.net web form using VB
The problem I am having is that the XML file is layed out as the example bellow
<system>
<node1>
<content>
Text Here
</content>
</node1>
</system>
I Call th xml file into an XMLDataDocument, update it and then save it back using
Sxml.PreserveWhitespace = True
Dim wrtr As XmlTextWriter = New XmlTextWriter("C:\test.xml", Encoding.Unicode)
Sxml.WriteTo(wrtr)
wrtr.Close()
This does udate the exsisting xml but it messes the layout of the xml file up for example the xml then looks similar as follows
<system><node1>
<content>
Text Here</content>
</node1></system>
it no longer has a tree structure, it still work when I import it but as my actual xml is rather large it is hard to view it for development
Anyone have any ideas I am new to XML but have learnt alot but all tutorials seem to assume that the layout does not get changed
Thanks
Anymore info just ask
Lee
Still having problems with my XML files
I have an XML file that is updated froman asp.net web form using VB
The problem I am having is that the XML file is layed out as the example bellow
<system>
<node1>
<content>
Text Here
</content>
</node1>
</system>
I Call th xml file into an XMLDataDocument, update it and then save it back using
Sxml.PreserveWhitespace = True
Dim wrtr As XmlTextWriter = New XmlTextWriter("C:\test.xml", Encoding.Unicode)
Sxml.WriteTo(wrtr)
wrtr.Close()
This does udate the exsisting xml but it messes the layout of the xml file up for example the xml then looks similar as follows
<system><node1>
<content>
Text Here</content>
</node1></system>
it no longer has a tree structure, it still work when I import it but as my actual xml is rather large it is hard to view it for development
Anyone have any ideas I am new to XML but have learnt alot but all tutorials seem to assume that the layout does not get changed
Thanks
Anymore info just ask
Lee