MXXMLWriter for pretty printing

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top