OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: MSXML: New document built has only one line.

DOM does not directly allow the serialization via save of "pretty" XML
documents.  One possible solution is to write your own save function that
iterates through the DOM tree outputting each item while inserting
tabs/spaces/LFs as needed.  There are plenty of samples available that show
how to iterate through the entire DOM tree.  The save function provided by
DOMDocument probably does something very similar to this.

If you were using a SAX parser, then you would need to write a
ContentHandler to output the XML as you see fit.


J. Keith Wedinger
Senior Software Developer
Sterling Commerce

-----Original Message-----
From: christine.coisy@modicon.com [mailto:christine.coisy@modicon.com]
Sent: Friday, March 02, 2001 10:16 AM
To: xml-dev@lists.xml.org
Subject: MSXML: New document built has only one line.


I'm using MSXML 3.0 and after the creation of a new document (with creation
nodes, insertion, append, etc... and a save) the file generated has only one
line without LF or CR.
Some editors allow visualizing correctly the files but these files are for
clients which want to be free to edit them with text editor.

Could you help me ?


The xml-dev list is sponsored by XML.org, an initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@lists.xml.org