You need to sign in to do that
Don't have an account?

XMLStreamWriter Doctype
Hi,
I'm just using the XMLStreamWriter to generate an XML String which I am then passing to a web service. I need to generate a string that starts:
<?xml version="1.0" standalone="no"?> <!DOCTYPE PRICEREQUEST SYSTEM \'http://164.39.41.88:81/PriceCheckerDTD1.0/PriceRequestIN.dtd\'>
So far I have:
XmlStreamWriter w = new XmlStreamWriter(); w.writeStartDocument(null, '1.0');
But I can't see anyway of adding the standalone attribute to the document start or the DOCTYPE tag to the next line.
Does anyone know how this can be achieved using the XMLStreamWriter?
Cheers
James
Hi,
Did you get any answer to your below query? Even I am facing the same concern
Hi,
Sadly not, the only way I could get this to work was to insert the plain text directly into the XML generator...
Sorry about that
James
This will give you the output as:
So this might will get your work done.