Solved

XML manipulation in struts

Posted on 2008-06-17
2
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 total points
ID: 21810556
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help needed with Powershell  XML to MySQL 5 88
SequenceInputStream example 3 38
add projects t working set in maven 2 68
XML Node Counting in MS Access VBA 4 81
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
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.

734 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