Preserving the structure of the input XML file

Oleg Dulin

Usenet Archive
Joined
Oct 6, 2003
Messages
4
Reaction score
0
Colleagues:

Does anyone know if there are less-lossy XML parsers and serializers that can capture and reproduce the structure of the input XML file including tabulation,whitespace, etc. ? We would love to know about experiences with parse/serialization approaches that have a greater infoset than that provided by SAX and DOM, especially related to ignorable whitespace and attributes ordering/whitespace. We are editing XML and want to preserve the file as much as possible.

Kind regards,
Oleg Dulin
Opence, Inc.
 

Andy Fish

Usenet Archive
Joined
Dec 30, 2002
Messages
605
Reaction score
0
this makes a change, most people want to do exactly the opposite and think that parsers preserve too much whitespace

I would have thought that as long as you set the "ignore whitespace" flag off, sax and DOM would give you all the whitespace in the file - that has been my experience (unless you're using MSXML which seems to swallow much more whitespace than other parsers)
 

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
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top