|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
The Document interface represents an XML Document.
This interface is a subset of the Document interface defined in the DOM Level 3 Core.
Note the behavior of the following methods from the
Node
interface when called on a Document
object:
null
HIERARCHY_REQUEST_ERR
HIERARCHY_REQUEST_ERR
NOT_SUPPORTED_ERR
Method Summary | |
---|---|
Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Create a new Element based on the specified
(qualified) SVG tag name. |
Element |
getDocumentElement()
Return a child element of this document Node which corresponds to the top-most tag in XML file. |
Element |
getElementById(java.lang.String id)
Return the Element in the current document with
the given unique ID. |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, getLocalName, getNamespaceURI, getParentNode, insertBefore, removeChild |
Method Detail |
---|
Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
Element
based on the specified
(qualified) SVG tag name. This JSR does not require multiple
namespaces and may throw a DOMException
with a
code of NOT_SUPPORTED_ERR
if the URI is not the
SVG namespace URI, or if the specified name is not a valid SVG
Tiny element name. Only the following elements must be supported:
<rect>, <circle>, <ellipse>, <line>,
<path> <use> <image> <text>,
<a> and <g>.
namespaceURI
- the namespace uri for the newly created
element. This should always be the SVG namespace URI "http://www.w3.org/2000/svg".qualifiedName
- the qualified name for the newly created
element (For example: "rect", to create a <rect> element)
DOMException
- NOT_SUPPORTED_ERR if the type of element is
not supported by the implementation. JSR 226 only requires creation
support for some of the SVG namespace elements and only for a limited
number of local names in that namespace (see above documentation). Therefore, in
a conformant JSR 226 implementation, trying to create elements with a namespace
URIs other than the SVG namespace URI and with a qualified name not in the list
of required qualified names may result in this exception being thrown.
java.lang.NullPointerException
- if namespaceURI
or
qualifiedName
is null.Element getDocumentElement()
SVGSVGElement
, but return
type is Element for DOM Core compatibility and to allow for future extensions.
Element
associated with this
document.
java.lang.SecurityException
- if the application does not have the necessary privilege rights
to access this (SVG) content.Element getElementById(java.lang.String id)
Element
in the current document with
the given unique ID. If no such element exists, this returns null.
id
- the ID of the object to be retrieved.
null
if the ID is not present.
java.lang.NullPointerException
- if id 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 |