469,364 Members | 2,398 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,364 developers. It's quick & easy.

MXXMLWriter for pretty printing


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.

<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.
Jul 20 '05 #1
0 1826

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by kg | last post: by
4 posts views Thread by Al Jones | last post: by
2 posts views Thread by Brad Pears | last post: by
2 posts views Thread by Matt | last post: by
3 posts views Thread by =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post: by
7 posts views Thread by SpaceMarine | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.