Can anyone help me finding the best way to read the dynamic URL returned XML . Like webservices this URL returns the result in an XML and I want to embed this result into my application.
The best way I thought was to use XMLBeans and map the results into a JavaBean. But I am little confused with this approach. As firstly I need to create XSD from the XML, then based on that XSD I have to build java classes and .XSB files to map to javabeans.
Confusion lies here-
1) What if the returned XML changes some of the returned attribute
2) Can XMLBean map XML to javabeans dynamically?
3) Is there anyother way/framework to map XML to javabeans dynamically?
4) Does Axis provides any mechanism to map XML to Javabeans dynaimically?
Your help is highly appreciated.
What is the purpose of mapping XmlSchema Definitions to JavaBeans dynamically???? XML navigation isn't harder than reflection/introspection.
Just compile an XSD an use it.
PS: it seems that you don't understand what IS XSD and what you call 'convert' XML to XSD. In two words: you cannot 'convert' XML to XSD, because XSD defines a domain (very probably infinite) of XMLs that conform to it. But you can compose XSD by hand if you know (exactly) which XMLs will conform to it.
Later, you use this XSD to convert ANY XMLs that conform to it to JavaBeans.