|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DomDocument
Encapsulates a Document. Implementations of this interface must be thread-safe.
| Method Summary | |
|---|---|
DomDocument |
clone()
Clones the DOM document. |
DomElement |
createElement(String namespaceUri,
String localName)
Creates a new element in the dom document. |
DOMSource |
getDomSource()
Returns a new DOMSource of the document. |
DomElement |
getElementById(String id)
Gets an element by its id. |
List<DomElement> |
getElementsByNameNs(String namespaceUri,
String localName)
Gets all elements with the namespace and name. |
DomElement |
getRootElement()
Returns the root element of the document. |
String |
registerNamespace(String namespaceUri)
Registers a new namespace with a generic prefix. |
void |
registerNamespace(String prefix,
String namespaceUri)
Registers a new namespace for the prefix. |
void |
setRootElement(DomElement rootElement)
Sets the root element of the DOM document. |
| Method Detail |
|---|
DomElement getRootElement()
void setRootElement(DomElement rootElement)
rootElement - the new root element
DomElement createElement(String namespaceUri,
String localName)
namespaceUri - the namespaceUri of the new elementlocalName - the localName of the new element
DomElement getElementById(String id)
id - the id to search for
List<DomElement> getElementsByNameNs(String namespaceUri,
String localName)
namespaceUri - the element namespaceURI to search forlocalName - the element name to search for
DOMSource getDomSource()
DOMSource of the document.
Note that a DOMSource wraps the underlying Document which is
not thread-safe. Multiple DOMSources of the same document should be synchronized
by the calling application.
DOMSourceString registerNamespace(String namespaceUri)
namespaceUri - the namespaceUri of the new namespace
void registerNamespace(String prefix,
String namespaceUri)
prefix - the prefix of the new namespacenamespaceUri - the namespaceUri of the new namespaceDomDocument clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||