Preserving the structure of the input XML file

O

Oleg Dulin

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.
 
A

Andy Fish

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

Forum statistics

Threads
474,140
Messages
2,570,810
Members
47,357
Latest member
sitele8746

Latest Threads

Top