Re: XML formatting question.



I am using MSXML parser's DOM interface.
I can insert CR in child nodes like this:
<root>
<node>
</node>
<root>


But I can not insert CR and Tab char between attributes.
Thanks!

"Tom Serface" <tom.nospam@xxxxxxxxxxxxx> 写入消息 news:FB7A7BAC-AD0F-4A82-8EFC-9EEF584017AF@xxxxxxxxxxxxxxxx
Which XML parser are you using? Most of the one's I've seen have a separate XML formatter (SAX parser?) that allows you to set up the format for how files are written. In any event, except for visual it doesn't matter how the file is written.

Tom

"fiveight" <fiveight@xxxxxxx> wrote in message news:64C953E8-1A2D-4839-A5B4-6B1C07A63E7C@xxxxxxxxxxxxxxxx
Hi All:

For example, I load a XML file with DOM. XML file like this:

<root a="a" b="b"/>

Then I want to save and format this file like this:

<root
a="a"
b="b"
/>

But I find that I can not insert CR and Tab char between attributes. Help me, please!

Fiveight



.