1.

Name some of the important DOM parsing methods.

Answer»

When you are working with the DOM, there are several methods you'll use often −

  • Document.getDocumentElement() - Returns the root element of the document.

  • Node.getFirstChild() - Returns the first child of a given Node.

  • Node.getLastChild() - Returns the last child of a given Node.

  • Node.getNextSibling() - These methods return the next sibling of a given Node.

  • Node.getPreviousSibling() - These methods return the previous sibling of a given Node.

  • Node.getAttribute(attrName) - For a given Node, returns the attribute with the requested name.



Discussion

No Comment Found