当前位置: 首页 > 网络学院 > XML相关教程 > XML DOM > DOM 节点信息

XML DOM
DOM Attribute
DOM Text
DOM CDATA
DOM Comment
DOM HttpRequest
DOM ParseError
DOM 校验器
DOM 介绍
DOM 摘要
DOM 案例
DOM 节点树
DOM 访问节点树
DOM 节点信息
DOM 文档执行
DOM 节点导航

XML DOM 中的 DOM 节点信息


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 547 ::
收藏到网摘: n/a

nodeName
节点名称

The nodeName property contains the name of a node:
nodeName[节点名称] 属性包含的名称如下:

  • The nodeName of an element node is the tag name
    元素节点的 nodeName[节点名称]是一个标签名称
  • The nodeName of an attribute node is the attribute name
    一个属性节点的 nodeName[节点名称]指的是属性的名称
  • The name of a text node is always #text
    文本节点的名称通常是#text
  • The name of the document node is always #document
    文档节点的名称通常是#document

Note: nodeName always contains the uppercase tag name of an XML element.
注意: nodeName[节点名称]通常包含XML元素的标签名称的大写字母形式。


nodeValue
节点值

On text nodes, the nodeValue property contains the text.
在文本节点中,nodeValue[节点值] 属性包含了文本。

On attribute nodes, the nodeValue property contains the attribute value.
在属性节点中,nodeValue[节点值] 属性包含了属性值。

The nodeValue property is not available on document and element nodes.
nodeValue[节点值] 属性不能用于文档和元素节点。


nodeType
[节点类型]

The nodeType property returns the type of node.
nodeType[节点类型]属性返回了节点的类型。

The most important node types are:
最重要的nodeType[节点类型]如下:

Element type
元素类型
NodeType
节点类型
Element 元素 1
Attribute 属性 2
Text 文本 3
Comment 注释 8
Document 文档 9

评论 (0) All

登陆 | 还没注册?