xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rasmus Munk Jensen" <m...@writeme.com>
Subject problems setting ProcessingInstruction node
Date Sat, 23 Jun 2001 23:23:24 GMT
Hi

I have some problems setting the ProcessingInstructionNode in the document.

To create a ProcessingInstructionNode,and append it to the document, I do
this:

docBuilder  = DocumentBuilderFactory.newInstance().newDocumentBuilder();
responseDOM = docBuilder.newDocument();
ProcessingInstruction proc = responseDOM.createProcessingInstruction("xml",
"version=\"1.0\" encoding=\"iso-8859-1\"");
responseDOM.appendChild(proc);



but when I read the XML output from the responseDOM, my processing
instruction is preceede by a "default" one:
<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0"
encoding="iso-8859-1"?><data></data>

how do I remove, or replace the "default" processing instruction, so I can
end up with an ouput like this:
<?xml version="1.0" encoding="iso-8859-1"?><data></data>


thanks,

Rasmus



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message