cancel
Showing results for 
Search instead for 
Did you mean: 

XML <-> Java Object <-> XML

Former Member
0 Kudos

I am looking for a good tutorial (&libs) for xml - java object - xml transformation, i.e. to represent PCD tree as java object, change it and then upload it to the portal.

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

There are several option that you can use. You can use Castor http://www.castor.org/ where in you can define a mapping file and easily convert java objects to xml and vice versa.

There is also another open source tool called XMLBeans which can generate JavaObjects just from the schema defination.

Hope this helps.

detlev_beutner
Active Contributor
0 Kudos

Hi Platon,

you could simply use JDOM or DOM4J to parse the XML and traverse the tree and manipulate the entries; even if this might be a too low level access to be really semantic, it has the advantage to preserve the original XML.

Another possibility would be http://jakarta.apache.org/commons/digester but I expect more difficulties to create XML which really can be imported.

Anyhow, you can also modify the PCD without going via XML. See http://help.sap.com/saphelp_nw04/helpdata/en/fd/ea5c42da4de92ce10000000a1550b0/frameset.htm

Hope it helps

Detlev