Package nu.validator.saxtree
Class ParentNode
java.lang.Object
nu.validator.saxtree.Node
nu.validator.saxtree.ParentNode
- All Implemented Interfaces:
Locator
Common superclass for parent nodes.
- Version:
- $Id$
- Author:
- hsivonen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node child) Append a child to this node and return the child.void
appendChildren
(Node parent) Append the children of another node to this node removing them from the other node .void
copyEndLocator
(ParentNode another) Copies the endLocator from another node.final Node
Returns the firstChild.final Node
Returns the lastChild.insertBefore
(Node child, Node sibling) Insert a new child before a pre-existing child and return the newly inserted child.insertBetween
(Node child, Node prev, Node next) void
setEndLocator
(Locator endLocator) Sets the endLocator.Methods inherited from class nu.validator.saxtree.Node
detach, getAttributes, getColumnNumber, getData, getLineNumber, getLocalName, getName, getNextSibling, getNodeType, getParentNode, getPrefixMappings, getPreviousSibling, getPublicId, getPublicIdentifier, getQName, getSystemId, getSystemIdentifier, getTarget, getUri
-
Field Details
-
endLocator
The end locator.
-
-
Method Details
-
setEndLocator
Sets the endLocator.- Parameters:
endLocator
- the endLocator to set
-
copyEndLocator
Copies the endLocator from another node.- Parameters:
another
- the another node
-
getFirstChild
Returns the firstChild.- Overrides:
getFirstChild
in classNode
- Returns:
- the firstChild
-
getLastChild
Returns the lastChild.- Returns:
- the lastChild
-
insertBefore
Insert a new child before a pre-existing child and return the newly inserted child.- Parameters:
child
- the new childsibling
- the existing child before which to insert (must be a child of this node) ornull
to append- Returns:
child
-
insertBetween
-
appendChild
Append a child to this node and return the child.- Parameters:
child
- the child to append.- Returns:
child
-
appendChildren
Append the children of another node to this node removing them from the other node .- Parameters:
parent
- the other node whose children to append to this one
-