JavaScript node operations DOMDocument properties and methods __javascript Learning

Source: Internet
Author: User
Tags readable
Property:

1 Attributes Storage node's properties list (read only)
2 childnodes List of sub nodes of storage node (read only)
3 DataType Returns the data type of this node
4 definition of a node given in a DTD or XML schema (read-only)
5 Doctype Specify document type node (read-only)
6 documentelement returns the root element of the document (Readable and writable)
7 FirstChild Returns the first child node of the current node (read-only)
8 Implementation return Xmldomimplementation object
9 LastChild Returns the last child node of the current node (read-only)
Ten nextSibling returns the next sibling node of the current node (read-only)
One nodename return the name of the node (read only)
NodeType returns the type of the node (read-only)
nodeTypedValue Storage node value (readable and writable)
NodeValue returns the text of the node (readable and writable)
Ownerdocument returns the root document containing this node (read-only)
ParentNode Back to parent node (read only)
Parsed returns whether this node and its child nodes have been resolved (read-only)
Prefix return namespace prefix (read only)
PRESERVEWHITESPACE Specifies whether to leave blank (read-write)
PreviousSibling returns the previous sibling node of this node (read-only)
Text returns the textual content of this node and its descendants (readable and writable)
A URL returns the URL of the most recently loaded XML document (read-only)
XML representation of a node and its descendants (read-only)

Method:

1 AppendChild adds a new child node to the current node, after the last child node
2 CloneNode Returns the copy of the current node
3 CreateAttribute Create a new property
4 Createcdatasection Create a CDATA segment that includes the given data
5 Createcomment Create a comment node
6 Createdocumentfragment Create DocumentFragment Object
7 createelement Create an element node
8 Createentityreference Create EntityReference Object
9 CreateNode Create a node of a given type, name, and namespace
Createporcessinginstruction Create an operation instruction node
createTextNode Create a text node that includes a given data
getElementsByTagName returns the collection of elements of the specified name
HasChildNodes returns whether the current node has child nodes
InsertBefore inserts a child node before the specified node
Load Import an XML document at a specified location
Loadxml Import the XML document for the specified string
RemoveChild deletes the specified child node from the list of child nodes
ReplaceChild replaces the specified child node from the list of child nodes
Save the XML file to the specified node
SelectNodes a specified match to a node and returns a list of matching nodes
selectSingleNode a specified match to the node and returns the first matching node
Transformnode converts a node and its descendants using the specified style sheet
transformNodeToObject converts a node and its descendants to objects using the specified style sheet
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.