A
Andy Fish
Hi,
I am trying to use MXXMLWriter with the indent flag to pretty print an XML
document from vb6.
Although the output is mostly indented in a reasonable way, the end tags are
always bunched up at the end of a line not on a line by themselves e.g.
<a>
<b>
<c>some text</c/> </b>
<d>more text</d> </a>
am I doing something stupid here? is VB just displaying it in a funny way?
is there any other way to fix this behavior?
failing that, does anyone know of a SIMPLE way of indenting some XML with vb
and MSXML? by simple I mean less than 100 lines of code, no extra downloads
and no horrible API calls.
I realise that XML and whitespace is an emotive issue. My definition of
reformatting is that any whitespace within a text node (i.e. not at the
beginning or the end) or between text nodes should be preserved.
whitespace-only text nodes and leading/trailing whitespace should be
rewritten to "pretty up" the document. I think this would serve for 95% of
all 'pretty print' requirements.
I am trying to use MXXMLWriter with the indent flag to pretty print an XML
document from vb6.
Although the output is mostly indented in a reasonable way, the end tags are
always bunched up at the end of a line not on a line by themselves e.g.
<a>
<b>
<c>some text</c/> </b>
<d>more text</d> </a>
am I doing something stupid here? is VB just displaying it in a funny way?
is there any other way to fix this behavior?
failing that, does anyone know of a SIMPLE way of indenting some XML with vb
and MSXML? by simple I mean less than 100 lines of code, no extra downloads
and no horrible API calls.
I realise that XML and whitespace is an emotive issue. My definition of
reformatting is that any whitespace within a text node (i.e. not at the
beginning or the end) or between text nodes should be preserved.
whitespace-only text nodes and leading/trailing whitespace should be
rewritten to "pretty up" the document. I think this would serve for 95% of
all 'pretty print' requirements.