The whitespace in the document is read and stored by the parser. The
DOMWriter simply writes everything (including whitespace) in the document.
To strip ignorable whitespace, set the parser's flag to exclude it with
DOMParser::setIncludeIgnorableWhitespace(false);
Ta, evert
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 5:54 AM
> To: [EMAIL PROTECTED]
> Subject: Parser Functionality
>
>
>
> How does DOMSerializer keep formatting instructions from the input XML.
>
> Here is what my program does.
>
> Parse an input string into 'document' then print the document with the
> DOMSerializer class.
>
> eg
>
> why is the following XML printed "as is"
> <root><child1>34</child1>
> <child2>45</child2></root>
>
> and not
>
> <root>
> <child1>34</child1>
> <child2>45</child2>
> </root>
>
> or at least
>
> <root><child1>34</child1><child2>45</child2></root>
>
> does this mean that somewhere in the document object that there are
> formatting instructions?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]