File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed with unmarsheller

 
amulya gudapati
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the below code

JAXBContext ctx;

try {

ctx = JAXBContext.newInstance("testpkg.test");
unMarshaller = ctx.createUnmarshaller();

reader = new StringReader(testXML);

testpkg.Test test =
(testpkg.Test)unMarshaller.unmarshal(reader);
}

Test is the java object from the test.xml file created using xjc compiler.

in test.xml I have an element <abc> value </abc>

now after the code above i need to get that element <abc> value into a String.

please help...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic