锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品自在线一区二区,久久久久国产成人精品亚洲午夜,91亚洲性爱在线视频http://www.tkk7.com/juhongtao/category/13641.htmlzh-cnTue, 27 Feb 2007 08:40:16 GMTTue, 27 Feb 2007 08:40:16 GMT60XML DOM - The Document Objecthttp://www.tkk7.com/juhongtao/archive/2006/08/01/61128.htmljavaGrowingjavaGrowingTue, 01 Aug 2006 01:28:00 GMThttp://www.tkk7.com/juhongtao/archive/2006/08/01/61128.htmlhttp://www.tkk7.com/juhongtao/comments/61128.htmlhttp://www.tkk7.com/juhongtao/archive/2006/08/01/61128.html#Feedback0http://www.tkk7.com/juhongtao/comments/commentRss/61128.htmlhttp://www.tkk7.com/juhongtao/services/trackbacks/61128.htmlThe Document object is the root-node of a document. All nodes in a node-tree are childnodes of the Document object.


Examples

We will use the following XML document in the examples below: note.xml.

documentElement - Return the node name of the root element

createElement() - Create a new element

createTextNode() - Create a new text node

createCDATASection() - Create a new CDATA node

createComment() - Create a new comment node

getElementsByTagName() - Return the value of a specified node


The Document object

The Document object represents the entire XML document.

The Document object is the root-node of a document. All nodes in a node-tree are childnodes of the Document object.

A node can be an element node, an attribute node, a text node, or any other of the node types explained in the "Node types" chapter.

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard)

Document Object Properties

Property Description IE F N W3C
async Specifies whether downloading of an XML file should be handled asynchronously or not. True means that the load() method returns the control to the caller before the download is complete. False means that the download must be completed before the caller gets the control back 5 - - No
attributes Returns a NamedNodeMap that contains all attributes of a node 5 1 6 No
baseName Returns the name of a node (without namespaces) 5 - - No
childNodes Returns a node list that contains all children of a node 5 1 6 No
dataType Returns the data type of a node 5 - - No
definition Returns the definition of a node in the DTD/Schema 5 - - No
doctype Returns the DTD or Schema for the document 6 1 6 Yes
documentElement Returns the root element of the document 5 1 6 Yes
firstChild Returns the first child node of a node 5 1 6 No
implementation Returns the DOMImplementation object for this particular document 6 1 6 Yes
lastChild Returns the last child node of a node 5 - - No
namespaceURI Returns the URI of the namespace 5 1 6 No
nextSibling Returns the node immediately following a node. Two nodes are siblings if they have the same parent node 5 1 6 No
nodeName Returns the name of the node 5 1 6 No
nodeType Returns the node type as a number 5 1 6 No
nodeTypedValue Returns the value of a node expressed in its defined data type 5 - - No
nodeTypeString Returns the node type as a string 5 - - No
nodeValue Returns the value of the node 5 1 6 No
ownerDocument Returns the Document object of a node (returns the root node of the document) 5 1 6 No
parentNode Returns the parent node of a node 5 1 6 No
parsed Returns true if the node and all of its descendants have been parsed. Otherwise it returns false 5 - - No
parseError Returns a ParseError object containing information about the parse error 5 - - No
prefix Returns the namespace prefix of a node 5 - - No
preserveWhiteSpace Returns true if the default processing preserves white space. Otherwise it returns false 5 - - No
previousSibling Returns the node immediately previous to the current node. Two nodes are siblings if they have the same parent node 5 1 6 聽(tīng)
readyState Returns the current state of the XML document 5 - - No
text Returns the text content of a node and all its children 5 - - No
url Returns the URL for the last loaded XML document 5 - - No
validateOnParse Indicates whether the document should be validated by the parser. Default is true. If false, only well-formed XML will be parsed 5 - - No
xml Returns the XML of a node and all its children 5 - - No

Document Object Methods

Method Description IE F N W3C
abort() Aborts the XML download 5 - - No
appendChild("name") Appends a new childnode to a node 5 - - No
cloneNode(boolean) Creates an exact clone node of a node. If the boolean parameter is set to true, the cloned node clones all the child nodes of the original node as well 5 - - No
createAttribute("name") Creates a new attribute node 6 1 6 Yes
createCDATASection("text") Creates a new CDATA section node 5 - - Yes
createComment("text") Creates a new comment node 6 - - Yes
createDocumentFragment() Creates an empty documentFragment object 5 1 6 Yes
createElement("name") Creates a new element node 5 1 6 Yes
createEntityReference("name") Creates a new entityReference node 5 - - Yes
createNode(type,name,ns) Creates a new node 5 - - No
createProcessingInstruction(target,text) Creates a new processingInstruction node 5 - - Yes
createTextNode("text") Creates a new text node 5 1 6 Yes
getElementById("id") 聽(tīng) 5 1 6 Yes
getElementByName("name") 聽(tīng) 5 1 6 聽(tīng)
getElementsByTagName("name") Returns the specified node, and all its child nodes, as a node list 5 1 6 Yes
hasChildNodes() Returns true if a node has child nodes. Otherwise it returns false 5 - - No
insertBefore(newnode,refnode) Inserts a new node before an existing node 5 - - No
load("URL") Loads the specified XML document 5 - - No
loadXML("text") Loads an XML document using the specified string 5 - - No
nodeFromID(id) Returns the node for the element whose ID attribute matches the one specified 5 - - No
removeChild("name") Removes and returns the specified node 5 - - No
replaceChild(newnode,oldnode) Replaces an oldnode with a newnode, and returns the oldnode 5 - - No
save(obj) Saves an XML document to the specified location 5 - - No
selectNodes(pattern) Creates a node list of all the matching descendant nodes returned by the specified pattern 5 - - No
selectSingleNode(pattern) Returns a Node object for the first descendant node to match the specified pattern 5 - - No
transformNode(stylesheet) Processes a node and its descendants using the specified XSL stylesheet, and returns the result 5 - - No
transformNodeToObject(stylesheet,object) Processes a node and its descendants using the specified XSL stylesheet, and returns the result in the specified object 5 - - No

Events

Event Description IE F N W3C
ondataavailable Executes some code when the XML document data is available

Syntax: document.ondataavailable="myFunction"

5 - - No
onreadystatechange Executes some code when the readyState property changes

Syntax: document.onreadystatechange="myFunction"

5 - - No
ontransformnode Triggered before each node in the XML is transformed by each node in the style sheet

Syntax: boolean = ontransformnode(nodecode,nodedata)

5 - - No


]]>
主站蜘蛛池模板: 国产精品亚洲综合一区| 四虎永久免费地址在线网站| 亚洲日本va中文字幕久久| 免费一级做a爰片久久毛片潮| 国产成人精品免费视频软件| 亚洲AV成人一区二区三区在线看| 国产国产人免费视频成69堂| 亚洲第一页在线视频| 51精品视频免费国产专区| 亚洲国产精品美女| 久久久久国产精品免费免费搜索| 亚洲精品456人成在线| 午夜私人影院免费体验区| 色天使色婷婷在线影院亚洲| 免费国产a国产片高清网站| yellow视频免费在线观看| 亚洲色无码专区在线观看| 一区二区三区在线免费看| 亚洲综合色丁香麻豆| 久久久久久国产精品免费免费| 亚洲日韩久久综合中文字幕| 亚洲av无码成人精品区| 国产精品免费久久久久电影网| 亚洲精品无码乱码成人| 182tv免费视视频线路一二三 | 成人网站免费看黄A站视频| 亚洲精品私拍国产福利在线| 97人妻无码一区二区精品免费| 亚洲高清有码中文字| 亚洲免费无码在线| 最近免费中文在线视频| 亚洲Av无码国产一区二区| 亚洲AV无码一区二区三区DV| 一个人免费高清在线观看| 黄页网址在线免费观看| 亚洲AV日韩AV永久无码久久| 天天操夜夜操免费视频| 人妻在线日韩免费视频| 亚洲中文字幕久久精品无码A| 国产成人亚洲综合| 免费无码AV片在线观看软件|