Interface Node

All Superinterfaces:
EventTarget
All Known Subinterfaces:
Attr, CDATASection, CharacterData, Comment, Document, DocumentFragment, DocumentType, Element, EntityReference, HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLBaseElement, HTMLBaseFontElement, HTMLBodyElement, HTMLBRElement, HTMLButtonElement, HTMLCanvasElement, HTMLDataElement, HTMLDataListElement, HTMLDetailsElement, HTMLDialogElement, HTMLDirectoryElement, HTMLDivElement, HTMLDListElement, HTMLDocument, HTMLElement, HTMLEmbedElement, HTMLFieldSetElement, HTMLFontElement, HTMLFormElement, HTMLHeadElement, HTMLHeadingElement, HTMLHRElement, HTMLHtmlElement, HTMLIFrameElement, HTMLImageElement, HTMLInputElement, HTMLLabelElement, HTMLLegendElement, HTMLLIElement, HTMLLinkElement, HTMLMapElement, HTMLMarqueeElement, HTMLMenuElement, HTMLMetaElement, HTMLMeterElement, HTMLModElement, HTMLObjectElement, HTMLOListElement, HTMLOptGroupElement, HTMLOptionElement, HTMLOutputElement, HTMLParagraphElement, HTMLParamElement, HTMLPictureElement, HTMLPreElement, HTMLProgressElement, HTMLQuoteElement, HTMLScriptElement, HTMLSelectElement, HTMLSlotElement, HTMLSourceElement, HTMLSpanElement, HTMLStyleElement, HTMLTableCaptionElement, HTMLTableCellElement, HTMLTableColElement, HTMLTableDataCellElement, HTMLTableElement, HTMLTableHeaderCellElement, HTMLTableRowElement, HTMLTableSectionElement, HTMLTextAreaElement, HTMLTimeElement, HTMLTitleElement, HTMLUListElement, HTMLUnknownElement, HTMLVideoElement, Notation, ParentNode, ProcessingInstruction, SMILAnimateColorElement, SMILAnimateElement, SMILAnimateMotionElement, SMILAnimation, SMILDocument, SMILElement, SMILLayoutElement, SMILMediaElement, SMILRefElement, SMILRegionElement, SMILRootLayoutElement, SMILSetElement, SMILSwitchElement, SMILTopLayoutElement, SVGAElement, SVGAltGlyphDefElement, SVGAltGlyphElement, SVGAltGlyphItemElement, SVGAnimateElement, SVGAnimateMotionElement, SVGAnimateTransformElement, SVGAnimationElement, SVGCircleElement, SVGClipPathElement, SVGColorProfileElement, SVGComponentTransferFunctionElement, SVGCursorElement, SVGDefinitionSrcElement, SVGDefsElement, SVGDescElement, SVGElement, SVGEllipseElement, SVGFEBlendElement, SVGFEColorMatrixElement, SVGFEComponentTransferElement, SVGFECompositeElement, SVGFEConvolveMatrixElement, SVGFEDiffuseLightingElement, SVGFEDisplacementMapElement, SVGFEDistantLightElement, SVGFEFloodElement, SVGFEFuncAElement, SVGFEFuncBElement, SVGFEFuncGElement, SVGFEFuncRElement, SVGFEGaussianBlurElement, SVGFEImageElement, SVGFEMergeElement, SVGFEMergeNodeElement, SVGFEMorphologyElement, SVGFEOffsetElement, SVGFEPointLightElement, SVGFESpecularLightingElement, SVGFESpotLightElement, SVGFETileElement, SVGFETurbulenceElement, SVGFilterElement, SVGFontElement, SVGFontFaceElement, SVGFontFaceFormatElement, SVGFontFaceNameElement, SVGFontFaceSrcElement, SVGFontFaceUriElement, SVGForeignObjectElement, SVGGElement, SVGGlyphElement, SVGGlyphRefElement, SVGGradientElement, SVGHKernElement, SVGImageElement, SVGLinearGradientElement, SVGLineElement, SVGMarkerElement, SVGMaskElement, SVGMetadataElement, SVGMissingGlyphElement, SVGMPathElement, SVGPathElement, SVGPatternElement, SVGPolygonElement, SVGPolylineElement, SVGRadialGradientElement, SVGRectElement, SVGScriptElement, SVGSetElement, SVGStopElement, SVGSVGElement, SVGSwitchElement, SVGSymbolElement, SVGTextContentElement, SVGTextElement, SVGTextPathElement, SVGTextPositioningElement, SVGTitleElement, SVGTRefElement, SVGTSpanElement, SVGUseElement, SVGViewElement, SVGVKernElement, Text, XPathNamespace
All Known Implementing Classes:
AttrImpl, CDataSectionImpl, CharacterDataImpl, CommentImpl, DocumentFragmentImpl, DocumentImpl, DocumentTypeImpl, DOM2DTMdefaultNamespaceDeclarationNode, DTMNodeProxy, ElementImpl, EntityReferenceImpl, HTMLAnchorElementImpl, HTMLBaseElementImpl, HTMLBasicInputElement, HTMLBodyElementImpl, HTMLBRElementImpl, HTMLButtonElementImpl, HTMLCanvasElementImpl, HTMLCenterElementImpl, HTMLDDElementImpl, HTMLDetailsElementImpl, HTMLDialogElementImpl, HTMLDirectoryElementImpl, HTMLDivElementImpl, HTMLDListElementImpl, HTMLDocumentImpl, HTMLElementImpl, HTMLEmElementImpl, HTMLFieldsetElementImpl, HTMLFigureElementImpl, HTMLFormElementImpl, HTMLGenericMarkupElement, HTMLHeadElementImpl, HTMLHeadingElementImpl, HTMLHRElementImpl, HTMLHtmlElementImpl, HTMLIFrameElementImpl, HTMLImageElementImpl, HTMLInputElementImpl, HTMLLabelElementImpl, HTMLLegendElementImpl, HTMLLIElementImpl, HTMLLinkElementImpl, HTMLMarqueeElementImpl, HTMLMeterElementImpl, HTMLMonospacedElementImpl, HTMLNonStandardElement, HTMLNoScriptElementImpl, HTMLObjectElementImpl, HTMLOListElementImpl, HTMLOptGroupElementImpl, HTMLOptionElementImpl, HTMLPElementImpl, HTMLPreElementImpl, HTMLProcessingInstruction, HTMLProgressElementImpl, HTMLQuoteElementImpl, HTMLScriptElementImpl, HTMLSelectElementImpl, HTMLSmallElementImpl, HTMLSpanElementImpl, HTMLStrikeElementImpl, HTMLStrongElementImpl, HTMLStyleElementImpl, HTMLSuperscriptElementImpl, HTMLTableCaptionElementImpl, HTMLTableCellElementImpl, HTMLTableColElementImpl, HTMLTableColGroupElementImpl, HTMLTableElementImpl, HTMLTableRowElementImpl, HTMLTableSectionElementImpl, HTMLTextAreaElementImpl, HTMLTitleElementImpl, HTMLUListElementImpl, HTMLUnderlineElementImpl, HTMLVideoElementImpl, NodeImpl, NotationImpl, RSSChanelElementImpl, RSSDescriptionElementImpl, RSSElement, RSSElementImpl, RSSItemElementImpl, RSSTitleElementImpl, SVGAElementImpl, SVGAnimateElementImpl, SVGAnimateTransformElementImpl, SVGAnimationElementImpl, SVGAnimationImpl, SVGCircleElementImpl, SVGClipPathElementImpl, SVGDefsElementImpl, SVGElementImpl, SVGEllipseElementImpl, SVGFontElementImpl, SVGFontFaceElementImpl, SVGGElementImpl, SVGGradientElementImpl, SVGGraphic, SVGImageElementImpl, SVGLinearGradientElementImpl, SVGLineElementImpl, SVGLocatableImpl, SVGPathElementImpl, SVGPolygonElementImpl, SVGPolylineElementImpl, SVGRadialGradientElementImpl, SVGRectElementImpl, SVGStopElementImpl, SVGStylableImpl, SVGSVGElementImpl, SVGSymbolElementImpl, SVGTextElementImpl, SVGTransformableImpl, SVGUseElementImpl, TextImpl, XMLDocument, XPathNamespaceImpl

public interface Node extends EventTarget
Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way.
  • Field Details

  • Method Details

    • getBaseURI

      String getBaseURI()
      Returns node's node document's document base URL.
      Returns:
      a String object.
    • getPrefix

      String getPrefix()
      Returns prefix.
      Returns:
      a String object.
    • getChildNodes

      NodeList getChildNodes()
      Returns the children.
      Returns:
      a NodeList object.
    • getFirstChild

      Node getFirstChild()
      Returns the first child.
      Returns:
      a Node object.
    • isIsConnected

      boolean isIsConnected()
      Returns true if node is connected and false otherwise.
      Returns:
      a boolean.
    • getLastChild

      Node getLastChild()
      Returns the last child.
      Returns:
      a Node object.
    • getNamespaceURI

      @Deprecated String getNamespaceURI()
      Deprecated.

      getNamespaceURI.

      Returns:
      a String object.
    • getNextSibling

      Node getNextSibling()
      Returns the next sibling.
      Returns:
      a Node object.
    • getNodeName

      String getNodeName()
      Returns a string appropriate for the type of node.
      Returns:
      a String object.
    • getNodeType

      int getNodeType()
      Returns the type of node.
      Returns:
      a Integer object.
    • getNodeValue

      String getNodeValue()

      getNodeValue.

      Returns:
      a String object.
    • getOwnerDocument

      Document getOwnerDocument()
      Returns the node document. Returns null for documents.
      Returns:
      a Document object.
    • getParentElement

      HTMLElement getParentElement()
      Returns the parent element.
      Returns:
      a HTMLElement object.
    • getParentNode

      Node getParentNode()
      Returns the parent.
      Returns:
      a Node object.
    • getPreviousSibling

      Node getPreviousSibling()
      Returns the previous sibling.
      Returns:
      a Node object.
    • getRootNode

      Node getRootNode()
      Returns node's root.
      Returns:
      a Node object.
    • getLocalName

      String getLocalName()

      getLocalName.

      Returns:
      a String object.
    • getTextContent

      String getTextContent()

      getTextContent.

      Returns:
      a String object.
    • getUserData

      Object getUserData(String key)

      getUserData.

      Parameters:
      key - a String object.
      Returns:
      a Object object.
    • cloneNode

      Node cloneNode(boolean deep)
      Returns a copy of node. If deep is true, the copy also includes the node's descendants.
      Parameters:
      deep - a boolean.
      Returns:
      a Node object.
    • cloneNode

      Node cloneNode()

      cloneNode.

      Returns:
      a Node object.
    • setOwnerDocument

      void setOwnerDocument(Document document)

      setOwnerDocument.

      Parameters:
      document - a Document object.
    • setNodeValue

      void setNodeValue(String nodeValue) throws DOMException

      setNodeValue.

      Parameters:
      nodeValue - a String object.
      Throws:
      DOMException
    • setTextContent

      void setTextContent(String textContent)

      setTextContent.

      Parameters:
      textContent - a String object.
    • setPrefix

      void setPrefix(String prefix)

      setPrefix.

      Parameters:
      prefix - a String object.
    • setUserData

      Object setUserData(String key, Object data, UserDataHandler handler)

      setUserData.

      Parameters:
      key - a String object.
      data - a Object object.
      handler - a UserDataHandler object.
      Returns:
      a Object object.
    • contains

      boolean contains(Node other)
      Returns true if other is an inclusive descendant of node, and false otherwise.
      Parameters:
      other - a Node object.
      Returns:
      a boolean.
    • hasChildNodes

      boolean hasChildNodes()
      Returns whether node has children.
      Returns:
      a boolean.
    • insertBefore

      Node insertBefore(Node newChild, Node refChild)

      insertBefore.

      Parameters:
      newChild - a Node object.
      refChild - a Node object.
      Returns:
      a Node object.
    • isDefaultNamespace

      boolean isDefaultNamespace(String namespace)

      isDefaultNamespace.

      Parameters:
      namespace - a String object.
      Returns:
      a boolean.
    • isEqualNode

      boolean isEqualNode(Node otherNode)
      Returns whether node and otherNode have the same properties.
      Parameters:
      otherNode - a Node object.
      Returns:
      a boolean.
    • isSameNode

      boolean isSameNode(Node otherNode)

      isSameNode.

      Parameters:
      otherNode - a Node object.
      Returns:
      a boolean.
    • lookupNamespaceURI

      String lookupNamespaceURI(String prefix)

      lookupNamespaceURI.

      Parameters:
      prefix - a String object.
      Returns:
      a String object.
    • lookupPrefix

      String lookupPrefix(String namespace)

      lookupPrefix.

      Parameters:
      namespace - a String object.
      Returns:
      a String object.
    • normalize

      void normalize()
      Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
    • appendChild

      Node appendChild(Node newChild)

      appendChild.

      Parameters:
      newChild - a Node object.
      Returns:
      a Node object.
    • prependChild

      Node prependChild(Node newChild)

      prependChild.

      Parameters:
      newChild - a Node object.
      Returns:
      a Node object.
    • prepend

      Node prepend(Node newChild)

      prepend.

      Parameters:
      newChild - a Node object.
      Returns:
      a Node object.
    • removeChild

      Node removeChild(Node oldChild)

      removeChild.

      Parameters:
      oldChild - a Node object.
      Returns:
      a Node object.
    • replaceChild

      Node replaceChild(Node newChild, Node oldChild)

      replaceChild.

      Parameters:
      newChild - a Node object.
      oldChild - a Node object.
      Returns:
      a Node object.
    • getAttributes

      NamedNodeMap getAttributes()

      getAttributes.

      Returns:
      a NamedNodeMap object.
    • compareDocumentPosition

      short compareDocumentPosition(Node other)

      compareDocumentPosition.

      Parameters:
      other - a Node object.
      Returns:
      a short.
    • hasAttributes

      boolean hasAttributes()
      Returns true if element has attributes, and false otherwise.
      Returns:
      a boolean.
    • isSupported

      boolean isSupported(String feature, String version)
    • getFeature

      Node getFeature(String feature, String version)