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
-
Difference between XML parser and binder (3 messages)
- Posted by: A JP
- Posted on: August 14 2002 15:38 EDT
Threaded Messages (3)
- Difference between XML parser and binder by sean decor on August 15 2002 20:00 EDT
- Difference between XML parser and binder by marc e. on August 16 2002 20:11 EDT
- Difference between XML parser and binder by Andy Bowes on August 19 2002 10:28 EDT
- Difference between XML parser and binder by marc e. on August 16 2002 20:11 EDT
-
Difference between XML parser and binder[ Go to top ]
- Posted by: sean decor
- Posted on: August 15 2002 20:00 EDT
- in response to A JP
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.
-
Difference between XML parser and binder[ Go to top ]
- Posted by: marc e.
- Posted on: August 16 2002 20:11 EDT
- in response to sean decor
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 -
Difference between XML parser and binder[ Go to top ]
- Posted by: Andy Bowes
- Posted on: August 19 2002 10:28 EDT
- in response to marc e.
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/