Assuming you are using DocumentBuilder's parse method: -assumption necessary since not too many details of your environment have been specified
the parse method returns an object of type Document which represents the entire XML document What are the chances that you have called the getDocumentElement method from the Document interface to return an object of type Element and then serializing the Element node instead of the Document node since the Element node does not include the stylesheet processing instruction it would not be a part of the serialized output of XMLSerializer I have run your example through Xerces serialize method in the XMLSerializer and obtained the correct output you are expecting - no problems at all and the OutputFormat object created was via the no args constructor Then if the process is repeated but child node of the Document - the root element of the document via the getDocumentElement method is passed as the argument to the serialize method - the processing instruction does not appear as would be expected as normal behaviour. Hope this helps.... but your question is very vague in the lack of details... Such as your statement " I then manipulate the DOM " also - the serializer you are using - are you setting any options in the outputformat? What version of Xerces are you using? information pertaining to the above would be helpful in providing you with answers to your problem, as opposed to having to speculate on exactly what problem you are experiencing and having to speculate upon the environment you are running in. _________________________________________________________________________ This mail sent via toadmail.com, web e-mail @ ToadNet - want to go fast? http://www.toadmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
