I am working with an XML schema that is so big it destroys JAXB. There is absolutely nothing I can do about this.
I am working with a 3rd party application that sends me XML based on that huge schema.
I need to add additional information to the XML. I can not mess with the 3rd party application. However, I have approval to embed that huge 3rd party xml into an outer document, as shown below:
Please do not suggest that I read the 3rd party data into a Java object and then write it back out. Like I said, the schema for that data is huge and kills JAXB, XML Spy code generation, and every XML<->Java toolkit out there except Jibx - which I am not approved to use.
Additionally, I really don't want to go thru the overhead of unmarshalling all of that and then remarshalling it.
Is there a convenient way for me to accomplish this using JAXB?
Could I interrupt the JAXB output stream and insert the 3rd party xml?
Is there a convenient way for me to use <any> in the MyDocument schema to allow me to slip it in?
Any other ideas?
Do I hand roll the opening MyDocument, have JAXB generate MyAddlData, append the Huge3rdPartyData, and then hand roll the closing MyDocument?
Thank you for your input on this problem
posted 3 years ago
After with a JAXB guy at work I think the best answer is:
Hand roll the opening MyDocument, have JAXB generate MyAddlData, append the Huge3rdPartyData, and then hand roll the closing MyDocument