Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nwoods.jgo
Interface DomNode

All Known Subinterfaces:
  DomCDATASection, DomElement, DomText

All Known Implementing Classes:
  AbstractNode, DefaultCDATASection, DefaultElement, DefaultText

public interface DomNode

An interface similar to org.w3c.dom.Node used for SVG XML serialization.

This interface allows the com.nwoods.jgo package to provide methods that manipulate org.w3c.dom.Node objects while not requiring the org.w3c.dom.Node class to be present in order to build com.nwoods.jgo.

Method Summary
`DomNode` | `appendChild(DomNode newChild)` Adds the node newChild to the end of the list of children of this node.
`DomElement` | `elementCast()` Casts this DomNode to a DomElement.
`DomNode` | `getFirstChild()` Get the first child node.
`DomElement` | `getFirstChildElement()` Get the first child DomElement of this node.
`DomText` | `getFirstChildText()` Get the first child DomText of this node.
`DomNode` | `getNextSibling()` Get the first sibling of this node.
`DomElement` | `getNextSiblingElement()` Get the first sibling DomElement of this node.
`DomElement` | `getNextSiblingJGoClassElement()` Get the first sibling JGoClass ComElement of this node.
`DomText` | `getNextSiblingText()` Get the first sibling DomText of this node.
`DomNode` | `getParentNode()` Get the parent of this node.
`boolean` | `isElement()` Tests if this DomNode is a DomElement.

Method Detail

### appendChild

    public DomNode appendChild(DomNode newChild)

  Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.

  Parameters:
    `newChild` - the node being appended
  Returns:
    the node added

### isElement

    public boolean isElement()

  Tests if this DomNode is a DomElement.

  Returns:
    true if the DomNode is a DomElement

### elementCast

    public DomElement elementCast()

  Casts this DomNode to a DomElement.

  Returns:
    the DomElement if the the DomNode is a DomElement. Returns null otherwise.

### getFirstChild

    public DomNode getFirstChild()

  Get the first child node.

  Returns:
    the first child of this node. If there is no such node, this returns null.

### getFirstChildElement

    public DomElement getFirstChildElement()

  Get the first child DomElement of this node.

  Returns:
    the first child DomElement of this node. If there is no such DomElement, this returns null.

### getFirstChildText

    public DomText getFirstChildText()

  Get the first child DomText of this node.

  Returns:
    the first child DomText of this node. If there is no such DomText, this returns null.

### getNextSibling

    public DomNode getNextSibling()

  Get the first sibling of this node.

  Returns:
    the first sibling of this node. If there is no such sibling, this returns null.

### getNextSiblingElement

    public DomElement getNextSiblingElement()

  Get the first sibling DomElement of this node.

  Returns:
    the first sibling DomElement of this node. If there is no such sibling, this returns null.

### getNextSiblingJGoClassElement

    public DomElement getNextSiblingJGoClassElement()

  Get the first sibling JGoClass ComElement of this node.

  Returns:
    the first sibling DomElement of this node. If there is no such sibling, this returns null.

### getNextSiblingText

    public DomText getNextSiblingText()

  Get the first sibling DomText of this node.

  Returns:
    the first sibling DomText of this node. If there is no such sibling, this returns null.

### getParentNode

    public DomNode getParentNode()

  Get the parent of this node.

  Returns:
    the first parent of this node. If there is no parent, this returns null.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD