Creating an XML document

I need help with coding,
I need to write a code where I’ll be extracting data from different XML documents in Tamino and creating an XML document populated with the extracted data.
Please advice.

Regards
V

What I need to know is how do I create an XML doc on a fly.
Please advice.
Thanks

This greatly depends on what object model you are using. Each object model has methods for creating a new xml object. For example if you are using JDOM you can simply construct a org.jdom.Document. Then you can use specific object model methods for building up the xml structure. Another method is to build a String. Again object models will have methods for parsing a string representation of the XML document to produce a DOM.

If you are using the TaminoAPI4J, it is possible to construct a TXMLObject in a variety of ways, either passing a string, or an object model specific document or element object.

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.

Hi,
As Stuart says, there are lots of ways to build XML documents depending on the Object Model you choose. Here are a couple of examples using both JDOM and DOM. I hope they help.
XML.zip (1.97 KB)