Js node attributes and Methods

Source: Internet
Author: User
Attribute: Attributes storage node attribute list (read-only) childNodes storage node subnode list (read-only) dataType returns the Data Type of this node. Definition defines (read-only) nodes in DTD or XML mode. Doctype specifies the file type node (read-only) documen... syntaxHighl

Attribute:

Attribute list of the Attributes storage node (read-only)
List of child nodes of the childNodes storage node (read-only)
DataType returns the Data Type of this node
Definition defines nodes in DTD or XML mode (read-only)
Doctype specifies the file type node (read-only)
DocumentElement returns the root element of the document (read/write)
FirstChild returns the first child node of the current node (read-only)
Implementation returns the XMLDOMImplementation object
LastChild returns the last child node of the current node (read-only)
NextSibling returns the next sibling node of the current node (read-only)
NodeName: return the node name (read-only)
NodeType return node type (read-only)
NodeTypedValue stores node values (read/write)
NodeValue returns the node text (read/write)
OwnerDocument returns the root document containing this node (read-only)
ParentNode returns the parent node (read-only)
Parsed: returns whether the node and Its subnodes have been Parsed (read-only)
Prefix returns the namespace Prefix (read-only)
PreserveWhiteSpace specifies whether to retain white space (read/write)
Previussibling returns the previous sibling node of this node (read-only)
Text returns the Text content of the node and its descendants (read/write)
Url returns the URL of the recently loaded XML document (read-only)
Xml returns the XML Representation of the node and its descendants (read-only)
Method:

AppendChild adds a new subnode to the current node, which is placed after the last subnode
CloneNode returns the copy of the current node
CreateAttribute
CreateCDATASection create CDATA segments that contain the given data
CreateComment create a comment Node
CreateDocumentFragment create a DocumentFragment object
CreateElement: Create an element node
CreateEntityReference: Create an EntityReference object
CreateNode creates nodes of the given type, name, and namespace.
CreatePorcessingInstruction
CreateTextNode: Create a text node that includes the given data
GetElementsByTagName returns the set of elements with the specified name.
HasChildNodes: returns whether the current node has subnodes.
InsertBefore inserts a subnode before a specified Node
Load import the XML document at the specified position
LoadXML import the XML document of the specified string
RemoveChild deletes a specified subnode from the subnode list.
ReplaceChild replaces the specified child node from the child node list
Save the XML file to the specified Node
SelectNodes matches the specified node and returns the list of matched nodes.
SelectSingleNode matches the specified node and returns the first matching node.
TransformNode converts nodes and their descendants using the specified style table.
TransformNodeToObject: Use the specified style sheet to convert nodes and their descendants to objects.

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.