DOM element attributes for processing XML documents
childNodes: Return An array of all child elements of the current element;
firstChild: returns the first subordinate child element of the current element;
lastChild: returns the last child element of the current element;
nextSibling: returns the element immediately following the current element element;
noedValue: specifies the read/write attribute representing the element value;
parentNode: returns the parent node of the element;
previousSibling: returns the element immediately before the current element;
DOM element method for traversing XML documents
getElementById( id)(document): Get the element in the document with the specified unique ID attribute value;
getElementsByTagName(name): Return an array of child elements with the specified tag name in the current element;
hasChildNodes(): Return a Boolean value , indicating whether the element has child elements;
getAttribute(name): Returns the attribute value of the element, the attribute is specified by name;
W3C DOM attributes and methods used when dynamically creating content
document.createElement(tagName): The createElement method on the document object can create For the element specified by tagName, if the string div is used as the method parameter, a div element will be generated;
document.createTextNode(text): The createTextNode method of the document object will create a node containing static text;
< element>.appendChild(childNode): The appendChild method adds the specified node to the current element's child node list (as a new child node). For example, you can add an option element as a child node of the select element;
.getAttriture(name): These methods obtain and set the value of the name attribute in the element respectively;
.setAttritube (name, value): These methods respectively obtain and set the value of the name attribute in the element;
.insertBefore(newNode, targetNode): This method inserts the node newNode as a child node of the current element in front of the targetNode element ;
.removeAttribute(name): This method removes the attribute name from the element;
.removeChild(childNode): This method removes the child element childNode from the element;
< ;element>.replaceChild(newNode,oldNode): This method replaces the node oldNode with the node newNode;
.hasChildnodes(): This method returns a Boolean value, specifying whether the element has child elements;