castor mapping with two root elements

P

prittz

Hi,

I want to generate an XML file from java bean,

I am able to generate the whole file as I want except the root
elements.

I want to root elments in my XML file with namespaces in it.

Below is example to XML required:

<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp timeStamp="2006-05-15T14:05:42Z" uuid="55b477a5-6282-474e-
a271-47617cb91aa8" xmlns:xdp="http://ns.adobe.com/xdp/">
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data>
<form1>
<Address>India</Address>
<FirstName>AA</FirstName>
<Zipcode>00</Zipcode>
</form1>
</xfa:data>
</xfa:datasets>
</xdp:xdp>

I am able to generate the above format except the
<xdp:xdp ............. which needs to wrap all the elements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top