I hope you guys can help me with a solution to the problem. I tried with google but could not get any similar solution to the problem I am encountering.
I have a scenario where in I need to convert xml tags. example From one application I receive a xml payload & I have to convert the same as & send it to another app. The app to which I need to send the data in xml format ihas published the dtd to which I need to confirm before passing the xml. This country tag is one such tag. There are numerous such elements which will arrive one at a time as events & not all together but they are supposed to be part of 1 dtd.
I would want to know what is the best way for converting one set of xml tags to another without tampering the data within those tags. Something like India
should be transformed to India.
One approach is XSLT where for every element/attribute I will need to specify the replacement value. But since the size of XML is huge I reckon this would be a time consuming process.
The other approach is transforming with SAX parsing where in I can modify the tags, add or delete a few ones.
I do not have much bandwidth on XML or Java in XML space.
Do post your thoughts on the same. If possible any has a sample on xml to xml conversion please do post it. That would be very helpful.