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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to