Babar Abbas wrote:
Hi all! There is a Prolog in XML document by default, <?xml version="1.0" encoding="UTF-8" ?>The api I have to pass my XML stream requires me to pass an additional Top Level Tag,<?qbxml version="2.0" ?>so the stream starts with, <?xml version="1.0" encoding="UTF-8" ?> <?qbxml version="2.0" ?> <QBXML> <QBXMLMsgsRq onError="stopOnError">--------------------</QBXMLMsgsRq> </QBXML>as in the above stream there a 2 prolog or header elements, xml and qbxml. XML is created by default, but how to create, the next one i.e. <?qbxml version=" 2.0" ?>, with the api's in org.w3c.dom package, or by the help of some other xerces package.for example sax packages. there are method calls to create Elements, Processing instructions, but no method for creating the prolog or top level headers, starting with <? ........?>, in the Document class, or I couldn't find one.
IMHO, the processing instruction is exactly what are you looking for. With W3C DOM, you should be able to add a ProcessingInstruction instance as a top level node by adding it to the Document instance either via appendChild or insertBefore.
Regards, Klaus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
