I'm using XSLT to transform XML and use Jaxb to parse the transformed XML, but received error saying
"The markup declarations contained or pointed to by the document type declaration must be well-formed."
After I traced into it, in Something.xsd file and the line that caused problem is "<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0">"
That's the xsd file I defined to generate Jaxb classes. I do have a </xs:schema> end tag at the end of Something.xsd.
What I'm doing are.... 1) I can use Something.xsd to generate Jaxb classes and this has been working for a while. 2) I used XSLT and Transformer to transform received XML into the same XML format as Something.xsd, and it generated an XML with the same format as Something.xsd. The generated XML has <!DOCTYPE>, which reference Something.xsd. 3) When I pass that transformed XML to my Jaxb classes, the unmarshaller complains about the line below "<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0">" saying it's not well-formed.
Does anyone have any ideas what's going on or is there any way that I can make transformed XML without showing "<!DOCTYPE>"?
SCJP, SCWCD, SCJD, (SCEA, MCSD.net)
Joined: May 15, 2003
I work it out!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com