You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Lange, Michael" <Mi...@RedPrairie.com> on 2003/05/02 23:49:38 UTC
Serializing without processing instruction
I've got a very simple XML document that I'm parsing via DOMBuilder::parse
and turning around and serializing it via DOMWriter::writeNode.
DOMWriter::writeNode is writing an initial processing instruction, which I
don't have in my original document and don't want serialized.
Here's what the original document looks like and how it's serialized.
Original Document
<name>
<first>mike</first>
</name>
Serialized Document
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<name>
<first>mike</first>
</name>
For the life of me, I can't find a way to serialize it without the pi. I
was surprised to find that when putting a filter on the writer the filter
was not called for the initial processing instruction.
Is there a way to do this?
Thanks for any help!
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Serializing without processing instruction
Posted by da...@us.ibm.com.
That's not a processing instruction -- it's the XML declaration. Why don't
you want it? No conforming XML processing system should treat the
documents differently.
Dave
"Lange, Michael"
<Michael.Lange@RedP To: "'xerces-c-dev@xml.apache.org'" <xe...@xml.apache.org>
rairie.com> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: Serializing without processing instruction
05/02/2003 02:49 PM
Please respond to
xerces-c-dev
I've got a very simple XML document that I'm parsing via DOMBuilder::parse
and turning around and serializing it via DOMWriter::writeNode.
DOMWriter::writeNode is writing an initial processing instruction, which I
don't have in my original document and don't want serialized.
Here's what the original document looks like and how it's serialized.
Original Document
<name>
<first>mike</first>
</name>
Serialized Document
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<name>
<first>mike</first>
</name>
For the life of me, I can't find a way to serialize it without the pi. I
was surprised to find that when putting a filter on the writer the filter
was not called for the initial processing instruction.
Is there a way to do this?
Thanks for any help!
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org