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://22.214.171.124: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?