public interface Document extends Branch
Document
defines an XML Document.
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE
Modifier and Type | Method and Description |
---|---|
Document |
addComment(String comment)
Adds a new
Comment node with the given text to this branch. |
Document |
addDocType(String name,
String publicId,
String systemId)
Adds a DOCTYPE declaration to this document
|
Document |
addProcessingInstruction(String target,
Map data)
Adds a processing instruction for the given target
|
Document |
addProcessingInstruction(String target,
String text)
Adds a processing instruction for the given target
|
DocumentType |
getDocType() |
EntityResolver |
getEntityResolver() |
Element |
getRootElement()
Returns the root
Element for this document. |
void |
setDocType(DocumentType docType)
Sets the DocumentType property
|
void |
setEntityResolver(EntityResolver entityResolver)
Sets the EntityResolver used to find resolve URIs such as for DTDs,
or XML Schema documents
|
void |
setRootElement(Element rootElement)
Sets the root element for this document
|
add, add, add, add, addElement, addElement, addElement, appendContent, clearContent, content, elementByID, indexOf, node, nodeCount, nodeIterator, normalize, processingInstruction, processingInstructions, processingInstructions, remove, remove, remove, remove, removeProcessingInstruction, setContent, setProcessingInstructions
accept, asXML, asXPathResult, clone, createXPath, detach, getDocument, getName, getNodeType, getNodeTypeName, getParent, getPath, getPath, getStringValue, getText, getUniquePath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, setParent, setText, supportsParent, valueOf, write
Element getRootElement()
Element
for this document.void setRootElement(Element rootElement)
rootElement
- the new root element for this documentDocument addComment(String comment)
Comment
node with the given text to this branch.comment
- is the text for the Comment
node.Document
instance.Document addProcessingInstruction(String target, String text)
target
- is the target of the processing instructiontext
- is the textual data (key/value pairs) of the processing instructionDocument
instance.Document addProcessingInstruction(String target, Map data)
target
- is the target of the processing instructiondata
- is a Map of the key / value pairs of the processing instructionDocument
instance.Document addDocType(String name, String publicId, String systemId)
name
- is the name of the root elementpublicId
- is the PUBLIC URIsystemId
- is the SYSTEM URIDocument instance.
DocumentType getDocType()
void setDocType(DocumentType docType)
EntityResolver getEntityResolver()
void setEntityResolver(EntityResolver entityResolver)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses