Discussions

XML & Web services: Difference between XML parser and binder

  1. Difference between XML parser and binder (3 messages)

    Hi !

    1. What is the difference between XML parser and binder.

    2. My understanding is, a XML document is necessary for a parser to process. Can the parser be used to create a XML file. Am I right ???

    3. This is my understanding too. A binder is a higher level which inturn has a parser. A binder could also work as a parser. Is it true ??

    Do throw some light on this.

    Thanks
    AJP
  2. Difference between XML parser and binder[ Go to top ]

    I hope this helps.

    1. XML parser is used to parse ( basically read or write ) an xml document

    2. The read / write can also be done using a xml binder .

    In case of parsers it works more like a file reader , reading a file like a stream etc.
    In case of binder, based on the xml file, binder creates java objects for the xml nodes and then u use these java objects to get / set values of the nodes in xml file.

     
  3. Difference between XML parser and binder[ Go to top ]

    Can you point me to some tutorials on using binding? When you say I'll have a set of objects containing the values of the entities, what do these objects look like? How does one get their value? Newbie to binding, here, and I'd like to have a basic idea of what i'm getting into before i get into it.

    Currently, I'm parsing an xml document with DOM and putting the values into a hashtable. It'd be nice to have java take care of this variable-making for me, and it sounds like that's what using a binder will do.

    thanks so much.

    Marc
  4. Difference between XML parser and binder[ Go to top ]

    What you are attempting to do can probably be acheived better using Java's JAXB Architecture. Basically JAXB uses the XML DTD or Schema to create a set of classes that represent the nodes in the XML hierarchy.

    IMHO It works very nicely.

    For more info see http://java.sun.com/xml/jaxb/