什么是最好的XML解析器 [英] what is the best XML parser

查看:150
本文介绍了什么是最好的XML解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想解析KML文件,并从中获取有关Google地图的一些信息。问题是女巫解析器我应该使用SAX,DOM还是JAXB。从我读到的JAXB听起来对我来说最好,但我读到了关于JAXB的内容。

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.

如果您的架构使用混合内容,请不要使用数据绑定。或者至少选择您的框架。数据绑定,顾名思义,是设计用于数据,而不是文档。混合内容,如XHTML,在Java接口或类中没有意义。一些框架支持模式的部分绑定,使得对象树的某些部分由来自的Node对象表示DOM或类似的API,但这不是通用功能。

"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".

KML架构是否使用混合内容,我可以使用JAXB执行此任务吗?
您能否告诉我更多关于SAX,DOM和JAXB的优缺点。

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.

推荐答案

KML不使用混合内容请参阅 http://code.google.com/apis/kml/schema/ kml21.xsd
JAXB最适合这种架构。

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

这篇关于什么是最好的XML解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆