From: Fernando G. <fer...@gm...> - 2007-03-20 09:44:18
|
As long as I know about GML files... It only defines data types to be used on your application specific schema. If you have a concrete application-specific schema, congratulations. Use a mapping tool like JAXB or Castor or whatever. If you haven't, you can't map because you don't have a schema to map. In this point I agree with Jimmy that you should use XPath to obtain the data of interest and I think VTD-XML is very useful. Fernando On 3/19/07, Tatu Saloranta <cow...@ya...> wrote: > > --- 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 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |