-
Nov 9th, 2010, 04:08 PM
#1
Best practice for transforming XML into another XML format.
Hi
I want to read in an XML file in one format and transform it into another XML format (our canonical data model) format. As the source XML document could be very large I want to take advantage of STAX and if possible reuse XSLT that our real time processing engine does to convert XML formats. I'm guessing it makes sense to use StaxEventItemReader for this but a way to transform the XML to another format. Is there a spring class to help with this? What is the most efficient approach. Would like the ItemWriter to write out the XML to a CLOB in the database.
Thanks
David
-
Nov 12th, 2010, 02:45 AM
#2
Sounds like a fairly vanilla use of StaxEventItemReader followed by some XML API manipulation, and then Spring JDBC for the writer. Any problems?
-
Nov 16th, 2010, 01:53 PM
#3
Thanks for getting back to me. Sorry about the delay in response. I guess the issue is where to do the transform. Ideally we could reuse our XSLT that will be using in our real time processing framework. From my understanding the ItemWriter takes a marshaller to take the XML and turn it into an object and then we use the ItemProcessor to set it to the object representation of our xsd. Can we go straight from one XML format to another? So pass a string that we can then write out to the database as a CLOB.
-
Nov 16th, 2010, 03:25 PM
#4
You are writing CLOBs to a database, so that sounds like a JDBC use case. If you have an XSLT transformer already working add it as an ItemProcessor and you are all set. Am I missing something?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules