当前位置: 技术问答>java相关
Why this node and nodelist is needed in XML dom interface
来源: 互联网 发布时间:2015-07-12
本文导语: When parsing xml using dom, i am wondering why there is a need to use node or nodelist in xml, wouldn't it be better to just have Element? like that Jdom deal with XML, any comments on this? | Node是一个更广...
When parsing xml using dom, i am wondering why there is a need to use node or nodelist in xml, wouldn't it be better to just have Element? like that Jdom deal with XML,
any comments on this?
any comments on this?
|
Node是一个更广泛的范围,所以要把它抽象出来作为最底层的接口。
Element固然是一个Node,但Attr、 Document和Text等都属于Node。
至于NodeList,它是一个平面结构存储的容器,与Node的树状结构相异。
Element固然是一个Node,但Attr、 Document和Text等都属于Node。
至于NodeList,它是一个平面结构存储的容器,与Node的树状结构相异。
|
DOM是DOM,和JDOM不一样,你可以认为JDOM是把DOM和SAX简便化了
|
wangwenyou(王文友):
W3C的DOM规范个人觉得更为严谨复杂--它要考虑多种语言共用同一接口;而JDOM则不同,它只为Java程序员量身定做
Could you please give an example where DOM's def can work while JDOM's can't work for a language like C++?
(Not familiar with JDOM, also want to learn from you)
Thanks.
W3C的DOM规范个人觉得更为严谨复杂--它要考虑多种语言共用同一接口;而JDOM则不同,它只为Java程序员量身定做
Could you please give an example where DOM's def can work while JDOM's can't work for a language like C++?
(Not familiar with JDOM, also want to learn from you)
Thanks.
|
好!
继续!
继续!
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。