This discussion is archived
3 Replies Latest reply: Nov 6, 2008 6:13 AM by 843785 RSS

How To Convert XML into String?

843785 Newbie
Currently Being Moderated

I have a requirement in which I need to convert the data from XML file to string.


< HookupDrawing>
< DrawingSpecification>
< StartDate/>
< PlantName>America</ PlantName>
< LineItems>
< LineItem>
< MaterialNumber>MatNum123</ MaterialNumber>
</ LineItem>
< ClientId>ClientID123</ ClientId>
< DrawingType/>
< TemplateName/>
<DrawingImage contentType=""/>
< /HookupDrawing>

Output should be like:
< File>
< Content>SUN Microsystems Mr.John America MatNum123 FamilyName123 ClientID123 FileName123</Content>
< /File>

As I am a novice in JAVA it will be very helpful to me if you provide me the exact and complete solution.