Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert XML to Java Object and vice versa .

843834Sep 25 2002 — edited Sep 25 2002
Hello To All !

I am a XML beginner and I need to find a some API to transform
an XML data (fully String presented document like this :
- <Listing>
<Name>Mary Smith</Name>
- <Address>
<StreetNum>888</StreetNum>
<StreetName>Broadway</StreetName>
<City>Somewhere</City>
<State>FL</State>
<Zip>87654</Zip>
- <PhoneNumber>
<AreaCode>222</AreaCode>
<Exchange>333</Exchange>
<Number>4444</Number>
</PhoneNumber>
</Address>
</Listing>
- <Listing>

) represented in java.lang.String to Element and vice versa .

I've tried some advantageous way using the JAXP compatible Xercer parser API's .
(http://www.ibiblio.org/xml/books/xmljava/chapters/ch13s02.html#IndentedFibonacci.java)

It's a good way to parse Element to String via XMLSerializer ..

But my question is : Is some API's exist to MAP somehow existing Java Object (Class) to Defined XML structure and vice versa for Automatical parsing from XML to Java Object and From Java Object to XML ?

If you know what I am talking about please respond to mmarat@hotmail.com .


Thank you ,


Marat

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2002
Added on Sep 25 2002
3 comments
199 views