ven12344 1 Posted March 12, 2012 Report Share Posted March 12, 2012 Hi I want to know, How can we get the complex elements in the xml file using XPath. For example, this is my xml file <envelope> <header/> <body> <parentComplexType> <request1> <element1> ....... <elementn> <request2> <element1> ....... <elementn> </parentComplexType> </body></envelope> I want to retrieve the "element1 to elementn" of request1 and request2. I am able to retrieve these, but the problem is that these are custom made class objects. So when I retireve I am getting this either as "String" or "Object". If I get as Object I am not able to cast to the Custom made objects even though Custom made class is Serialized. Please let me know. How can I do that. Thanks,Venkat. 1 Quote Link to post Share on other sites
boen_robot 107 Posted March 12, 2012 Report Share Posted March 12, 2012 What language are the custom objects in?You should probably make a method that specifies how the unserialization goes about, just as you have one that specifies how the serialization goes about. Quote Link to post Share on other sites
ven12344 1 Posted March 12, 2012 Author Report Share Posted March 12, 2012 We use Java, to create it. If I have to write a method to do that, I rather use JAXB which has everything already to use. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.