what is the best XML parser [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-12 03:09:55

问题


i want to parse KML file, and get some info from it about Google maps. The question is witch parser should i use SAX, DOM or JAXB. From what i read JAXB sounds best to me, but i read this about JAXB.

"If you have a schema that uses mixed content, don't use data binding. Or at least pick your framework carefully. Data binding, as its name suggested, is designed for data, not documents. Mixed content, like XHTML, just doesn't make sense expressed in a Java interface or class. Some frameworks support partial binding of a schema such that some portion of the object tree is represented by a Node object from DOM or a similar API, but this is not a universal feature".

Does KML schema use mixed content and can i use JAXB for this task? And can you tell me more about advantage and disadvantage of SAX, DOM and JAXB.


回答1:


KML does not used mixed content see http://code.google.com/apis/kml/schema/kml21.xsd JAXB is best at this kind of schema.



来源:https://stackoverflow.com/questions/9275758/what-is-the-best-xml-parser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!