|
From: Tatu S. <cow...@ya...> - 2007-03-19 19:27:58
|
--- Peter Neu <pet...@gm...> wrote: > Hello, > > someone on a different mailing list suggested vtd is > a good tool for mapping > GML to Java Objects. How is this done in detail? > Are there any tutorials on this? Hmmh. This actually sounds like a strange piece of advice, depending on what "good" means. VTD does offer high performance for efficient tree-based access to xml content. But it does not (and is not meant to I think) offer any support for actual mapping between xml and Java. That's what data binding (and/or serialization) toolkits/libs offer. And on top of that, there isn't any specific support for GML, and likewise, that sounds like something to be done on higher level tools. VTD could of course be used as the underlying parser component for such tools. I don't know if there are such tools out there yet. As to binding data to Java objects, JAXB 2.0 is widely considered to be a good and reasonably fast library. As far as I know, it currently supports just SAX and StAX parsers under the hood. Since much of overhead is at binding level (constructing java objects, populating fileds), parser choice may not affect overall performance that much. So regarding goodness: if raw performance is the main goal, using VTD might make sense. If so, you would NOT want to map things to objects, but rather deal with raw xml entities directly. This would be a trade-off, and resulting code could very well be hard to use or understand, so its goodness would depend a lot on priorities. -+ Tatu +- ____________________________________________________________________________________ The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php |