Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

XML manipulation in struts

Posted on 2008-06-17
2
Medium Priority
?
265 Views
Last Modified: 2013-11-24
In my struts Application,  From my Action class, I call the manager class and the manager class calls the  DAO calls which would query the DB to fetch the results . Now the requirement is, i need to construct the results in the form of an XML and send it back to my Action class as a " String " . In my action class I need to parse the XML and and get the individual items in the XML

My XML format should be  something like this
<Name> karthick <./Name>
<passwrod> xxxx </password>
<url>www.experts-exchange.com</url>

Please advice



0
Comment
Question by:karthickkrishnan
  • 2
2 Comments
 
LVL 10
ID: 21802010
Use Java xml binding for the above scenario. first prepare xsd for the above xml. Through jaxb you can generate POJO for the above xml. from db populate the values in the generated POJO. Then convert POJO to XML in the DAO and send to action class. And then in action class convert again the XML to pojo and access the individual items.
0
 
LVL 10

Accepted Solution

by:
krishna kishore mellacheruvu venkata earned 800 total points
ID: 21810556
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question