Before I was using this code to write an XML file using StAX:
This code was working fine but now it throws me an
javax.xml.stream.XMLStreamException: Trying to write multiple DOCTYPE declarations exception.
When debugging the application, I am able to see that the exception is thrown when I call the second time: eventWriter.add(end);
Why this code was working before and now it isn't?
The only modification that I made that could be a problem is that I added libraries to the project to use Axis2 Web Services (one of them is: geronimo-stax-api_1.0_spec-1.0.1.jar)... And I saw
this:
Speed - Axis2 uses its own object model and StAX (Streaming API for XML) parsing to achieve significantly greater speed than earlier versions of Apache Axis.
And
this:
stax-api-1.0.1.jar (The StAX API's that contain the javax.xml.namespace.QName class. This jar may be replaced by any other jar that contains the javax.xml.namespace.QName implementation. However Axis2 uses this class from the stax-api-1.0.1.jar which comes bundled with the Axis2 distribution)
Is that a compatibilty issue?