DTD_ATT_LIST_NODE, DTD_DECL_NODE, DTD_ELEMENT_DECL_NODE, DTD_ENTITY_DECL_NODE, DTD_NOTATION_DECL, NULL_VALUEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
DOMDocument(TextDocument textDocument,
URIResolverExtensionManager resolverExtensionManager) |
| Modifier and Type | Method and Description |
|---|---|
DOMNode |
adoptNode(Node source) |
DOMAttr |
createAttribute(String name) |
DOMAttr |
createAttributeNS(String namespaceURI,
String qualifiedName) |
DOMCDATASection |
createCDataSection(int start,
int end) |
CDATASection |
createCDATASection(String data) |
DOMComment |
createComment(int start,
int end) |
DOMComment |
createComment(String data) |
DocumentFragment |
createDocumentFragment() |
DOMDocumentType |
createDocumentType(int start,
int end) |
DOMElement |
createElement(int start,
int end) |
DOMElement |
createElement(String tagName) |
DOMElement |
createElementNS(String namespaceURI,
String qualifiedName) |
EntityReference |
createEntityReference(String name) |
DOMProcessingInstruction |
createProcessingInstruction(int start,
int end) |
DOMProcessingInstruction |
createProcessingInstruction(String target,
String data) |
DOMText |
createText(int start,
int end) |
DOMText |
createTextNode(String data) |
Collection<DOMNode> |
findDTDAttrList(String elementName)
Returns the DTD Attribute list for the given element name and empty
otherwise.
|
org.eclipse.lsp4j.jsonrpc.CancelChecker |
getCancelChecker() |
DOMDocumentType |
getDoctype() |
DOMElement |
getDocumentElement() |
String |
getDocumentURI() |
DOMConfiguration |
getDomConfig() |
DOMElement |
getElementById(String elementId) |
org.eclipse.lsp4j.Range |
getElementNameRangeAt(int textOffset)
Returns the element name on the left of the given position and null
otherwise.
|
NodeList |
getElementsByTagName(String tagname) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
Map<String,String> |
getExternalSchemaLocation() |
DOMImplementation |
getImplementation() |
String |
getInputEncoding() |
LineIndentInfo |
getLineIndentInfo(int lineNumber) |
String |
getNamespaceURI() |
String |
getNodeName() |
short |
getNodeType() |
NoNamespaceSchemaLocation |
getNoNamespaceSchemaLocation()
Returns the declared "xsi:noNamespaceSchemaLocation" and null otherwise.
|
DOMDocument |
getOwnerDocument()
Returns the owner document and null otherwise.
|
URIResolverExtensionManager |
getResolverExtensionManager() |
List<DOMNode> |
getRoots() |
String |
getSchemaInstancePrefix()
Returns the (xsi) schema instance prefix and null otherwise.
|
SchemaLocation |
getSchemaLocation()
Returns the declared "xsi:schemaLocation" and null otherwise.
|
String |
getSchemaPrefix()
Returns the XML Schema prefix (ex : 'xs' for
xmlns:xs="http://www.w3.org/2001/XMLSchema")
|
boolean |
getStrictErrorChecking() |
String |
getText()
Returns the text content of the XML document.
|
TextDocument |
getTextDocument() |
org.eclipse.lsp4j.Range |
getTrimmedRange(int start,
int end) |
org.eclipse.lsp4j.Range |
getTrimmedRange(org.eclipse.lsp4j.Range range) |
String |
getXmlEncoding() |
boolean |
getXmlStandalone() |
String |
getXmlVersion() |
boolean |
hasDTD()
Returns true if XML document has a DTD declaration and false otherwise.
|
boolean |
hasGrammar()
Returns true if the document is bound to a grammar and false otherwise.
|
boolean |
hasNamespaces()
Returns true if document defines namespaces (with xmlns) and false otherwise.
|
boolean |
hasNoNamespaceSchemaLocation()
Returns true if XML root element declares a "xsi:noNamespaceSchemaLocation"
and false otherwise.
|
boolean |
hasProlog()
If document has {@code
|
boolean |
hasSchemaInstancePrefix()
Returns true if (xsi) schema instance prefix exists.
|
boolean |
hasSchemaLocation()
Returns true if XML root element declares a "xsi:schemaLocation" and false
otherwise.
|
DOMNode |
importNode(Node importedNode,
boolean deep) |
boolean |
isDTD()
Returns true if the XML document is a DTD and false otherwise.
|
boolean |
isWithinInternalDTD(int offset)
Returns true if 'offset' is within an internal DOCTYPE dtd.
|
String |
lineDelimiter(int lineNumber) |
String |
lineText(int lineNumber) |
void |
normalizeDocument() |
int |
offsetAt(org.eclipse.lsp4j.Position position) |
org.eclipse.lsp4j.Position |
positionAt(int offset) |
DOMNode |
renameNode(Node n,
String namespaceURI,
String qualifiedName) |
void |
resetGrammar()
Reset the cached grammar flag.
|
void |
setCancelChecker(org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) |
void |
setDocumentURI(String documentURI) |
void |
setStrictErrorChecking(boolean strictErrorChecking) |
void |
setXmlStandalone(boolean xmlStandalone) |
void |
setXmlVersion(String xmlVersion) |
addChild, appendChild, cloneNode, compareDocumentPosition, findAttrAt, findAttrAt, findNodeAt, findNodeBefore, findNodeOrAttrAt, getAttribute, getAttributeAtIndex, getAttributeNode, getAttributeNode, getAttributeNodes, getAttributes, getBaseURI, getChild, getChildNodes, getChildren, getChildrenWithAttributeValue, getEnd, getFeature, getFirstChild, getLastChild, getLocalName, getNextSibling, getNodeValue, getParentElement, getParentNode, getPrefix, getPreviousNonTextSibling, getPreviousSibling, getStart, getTextContent, getUserData, hasAttribute, hasAttributes, hasChildNodes, insertBefore, isAttribute, isCDATA, isCharacterData, isChildOfOwnerDocument, isClosed, isComment, isDefaultNamespace, isDoctype, isDTDAttListDecl, isDTDElementDecl, isDTDEntityDecl, isDTDNotationDecl, isElement, isEqualNode, isGenericDTDDecl, isIncluded, isIncluded, isOwnerDocument, isProcessingInstruction, isProlog, isSameNode, isSupported, isText, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setAttributeNode, setNodeValue, setPrefix, setTextContent, setUserData, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatapublic DOMDocument(TextDocument textDocument, URIResolverExtensionManager resolverExtensionManager)
public void setCancelChecker(org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
public org.eclipse.lsp4j.jsonrpc.CancelChecker getCancelChecker()
public org.eclipse.lsp4j.Position positionAt(int offset)
throws BadLocationException
BadLocationExceptionpublic int offsetAt(org.eclipse.lsp4j.Position position)
throws BadLocationException
BadLocationExceptionpublic String lineText(int lineNumber) throws BadLocationException
BadLocationExceptionpublic String lineDelimiter(int lineNumber) throws BadLocationException
BadLocationExceptionpublic LineIndentInfo getLineIndentInfo(int lineNumber) throws BadLocationException
BadLocationExceptionpublic org.eclipse.lsp4j.Range getElementNameRangeAt(int textOffset)
textOffset - public String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class DOMNodepublic String getText()
public TextDocument getTextDocument()
public boolean hasGrammar()
public SchemaLocation getSchemaLocation()
public boolean hasSchemaLocation()
public NoNamespaceSchemaLocation getNoNamespaceSchemaLocation()
public boolean hasNoNamespaceSchemaLocation()
public boolean hasNamespaces()
public String getSchemaInstancePrefix()
public boolean hasSchemaInstancePrefix()
public boolean hasProlog()
<?xml ... ?>public boolean hasDTD()
public DOMElement createElement(int start, int end)
public DOMCDATASection createCDataSection(int start, int end)
public DOMProcessingInstruction createProcessingInstruction(int start, int end)
public DOMComment createComment(int start, int end)
public DOMText createText(int start, int end)
public DOMDocumentType createDocumentType(int start, int end)
public short getNodeType()
getNodeType in interface Nodepublic String getNodeName()
getNodeName in interface Nodepublic DOMElement getDocumentElement()
getDocumentElement in interface Documentpublic DOMDocumentType getDoctype()
getDoctype in interface Documentpublic DOMDocument getOwnerDocument()
DOMNodegetOwnerDocument in interface DOMRangegetOwnerDocument in interface NodegetOwnerDocument in class DOMNodepublic String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Documentpublic DOMNode adoptNode(Node source) throws DOMException
adoptNode in interface DocumentDOMExceptionpublic DOMAttr createAttribute(String name) throws DOMException
createAttribute in interface DocumentDOMExceptionpublic DOMAttr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS in interface DocumentDOMExceptionpublic CDATASection createCDATASection(String data) throws DOMException
createCDATASection in interface DocumentDOMExceptionpublic DOMComment createComment(String data)
createComment in interface Documentpublic DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic DOMElement createElement(String tagName) throws DOMException
createElement in interface DocumentDOMExceptionpublic DOMElement createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS in interface DocumentDOMExceptionpublic EntityReference createEntityReference(String name) throws DOMException
createEntityReference in interface DocumentDOMExceptionpublic DOMProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction in interface DocumentDOMExceptionpublic DOMText createTextNode(String data)
createTextNode in interface Documentpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic DOMElement getElementById(String elementId)
getElementById in interface Documentpublic NodeList getElementsByTagName(String tagname)
getElementsByTagName in interface Documentpublic NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS in interface Documentpublic DOMImplementation getImplementation()
getImplementation in interface Documentpublic String getInputEncoding()
getInputEncoding in interface Documentpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Documentpublic String getXmlVersion()
getXmlVersion in interface Documentpublic DOMNode importNode(Node importedNode, boolean deep) throws DOMException
importNode in interface DocumentDOMExceptionpublic void normalizeDocument()
normalizeDocument in interface Documentpublic DOMNode renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
renameNode in interface DocumentDOMExceptionpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentDOMExceptionpublic void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion in interface DocumentDOMExceptionpublic void resetGrammar()
public URIResolverExtensionManager getResolverExtensionManager()
public boolean isDTD()
public boolean isWithinInternalDTD(int offset)
offset - public org.eclipse.lsp4j.Range getTrimmedRange(org.eclipse.lsp4j.Range range)
public org.eclipse.lsp4j.Range getTrimmedRange(int start,
int end)
public Collection<DOMNode> findDTDAttrList(String elementName)
elementName - public String getSchemaPrefix()
Copyright © 2020. All rights reserved.