|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
The Node interface describes generic nodes in an SVG document tree. This interface is a subset of the Node interface defined in the DOM Level 3 Core.
Note: The methods defined in this interface allow DOM manipulation such as removal and insertion which may lead to the creation of a non-conforming SVG document fragment as described in the SVG1.1 specification, section G2. The rendering of these fragments may be handled differently by different SVG engine implementations, and therefore, it is strongly recommended that any application using this interface ensures that the resulting document is SVG-conformant. An example of non-conforming SVG fragment would be a rectangle inserted as a child of an other rectangle or as a child of an animation.
Method Summary | |
---|---|
Node |
appendChild(Node newChild)
Appends a child to this Node . |
java.lang.String |
getLocalName()
Returns the local part of the qualified name of this node. |
java.lang.String |
getNamespaceURI()
Returns the namespace URI of the Node. |
Node |
getParentNode()
Returns the parent Node of this Node . |
Node |
insertBefore(Node newChild,
Node refChild)
Inserts newChild before refChild in the child list for this node. |
Node |
removeChild(Node oldChild)
Removes the specified child associated with this Node. |
Method Detail |
---|
java.lang.String getNamespaceURI()
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.java.lang.String getLocalName()
null
is returned.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.Node getParentNode()
Node
of this Node
.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.Node appendChild(Node newChild) throws DOMException
Node
.
newChild
- the Node
to be appended to this
Node
. This is equivalent to insertBefore(newChild,null)
Node
.
DOMException
- with error code HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children
of the type of the newChild node, or if the node to append is one of this node's ancestors or this node itself,
or if this node is of type Document and the DOM application attempts to append a second Element node.
DOMException
- with error code WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than
the one that created this node.
DOMException
- with error code NOT_SUPPORTED_ERR: if the newChild node is a child of the Document node or if the
child is of a type that cannot be created with createElementNS.
DOMException
- with error code INVALID_STATE_ERR: if the newChild node would cause the document to go into
error, for ex: when the newChild contains a <use> element with an invalid xlink:href attribute.
DOMException
- with error code INVALID_ACCESS_ERR: if the element being appended to the tree already has a
parent and itself or one of its descendants has a non-null id.
java.lang.NullPointerException
- if newChild
is null.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.Node removeChild(Node oldChild) throws DOMException
oldChild
- the Node
that is to be removed.
DOMException
- with error code NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
DOMException
- with error code NOT_SUPPORTED_ERR: if this node is of type Document or if the
child, or any of its descendants, is of a type that cannot be created with createElementNS.
DOMException
- with error code INVALID_ACCESS_ERR: if the element being removed or one of its decendants
have non-null id.
java.lang.NullPointerException
- if oldChild
is null.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild
- the child to addrefChild
- the child before which the new child should be added.
DOMException
- with error code HIERARCHY_REQUEST_ERR: if this node is of a type that does not allow children
of the type of the newChild node, or if the node to append is one of this node's ancestors or this node itself,
or if this node is of type Document and the DOM application attempts to append a second Element node.
DOMException
- with error code WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than
the one that created this node.
DOMException
- with error code NOT_FOUND_ERR: raised if refChild is not a child of this node.
DOMException
- with error code NOT_SUPPORTED_ERR: if the newChild node is a child of the Document node or if the
child is of a type that cannot be created with createElementNS.
DOMException
- with error code INVALID_STATE_ERR: if the newChild node would cause the document to go into
error, for ex: when the newChild contains a <use> element with an invalid xlink:href attribute.
DOMException
- with error code INVALID_ACCESS_ERR: if the element being inserted into the tree already has a
parent and itself or one of its descendants has a non-null id.
java.lang.NullPointerException
- if newChild
is null.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |