public class XmlPage extends SgmlPage
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>
AS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
ATTRIBUTE_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 |
---|
XmlPage(Node node,
WebWindow enclosingWindow)
Creates an instance.
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow)
Creates an instance.
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow,
boolean ignoreSAXException)
Creates an instance.
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow,
boolean ignoreSAXException,
boolean handleXHTMLAsHTML)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
Node |
adoptNode(Node source)
Not yet implemented.
|
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
Not yet implemented.
|
DomElement |
createElement(String tagName)
Creates an element, the type of which depends on the specified tag name.
|
DomElement |
createElementNS(String namespaceURI,
String qualifiedName)
Create a new Element with the given namespace and qualified name.
|
EntityReference |
createEntityReference(String name)
Not yet implemented.
|
DomProcessingInstruction |
createProcessingInstruction(String target,
String data) |
DomElement |
createXmlElement(String tagName)
Deprecated.
as of 2.18, please use
createElement(String) instead |
DomElement |
createXmlElementNS(String namespaceURI,
String qualifiedName)
Deprecated.
as of 2.18, please use
createElementNS(String, String) instead |
String |
getContent()
Deprecated.
as of 2.18, please use
SgmlPage.getWebResponse() .getContentAsString() |
String |
getDocumentURI()
Not yet implemented.
|
DOMConfiguration |
getDomConfig()
Not yet implemented.
|
Element |
getElementById(String elementId)
Not yet implemented.
|
NodeList |
getElementsByTagNameNS(String namespace,
String name)
Not yet implemented.
|
DOMImplementation |
getImplementation()
Not yet implemented.
|
String |
getInputEncoding()
Not yet implemented.
|
String |
getPageEncoding()
Returns the page encoding.
|
boolean |
getStrictErrorChecking()
Not yet implemented.
|
Document |
getXmlDocument()
Returns the DOM representation of the XML content.
|
Iterable<DomElement> |
getXmlElementDescendants()
Deprecated.
as of 2.18, please use
DomNode.getDomElementDescendants() instead |
String |
getXmlEncoding()
Not yet implemented.
|
boolean |
getXmlStandalone()
Not yet implemented.
|
String |
getXmlVersion()
Not yet implemented.
|
boolean |
hasCaseSensitiveTagNames()
Returns
true if this page has case-sensitive tag names, false otherwise. |
Node |
importNode(Node importedNode,
boolean deep)
Not yet implemented.
|
Node |
renameNode(Node n,
String namespaceURI,
String qualifiedName)
Not yet implemented.
|
protected void |
setDocumentType(DocumentType type)
Sets the document type.
|
void |
setDocumentURI(String documentURI)
Not yet implemented.
|
void |
setStrictErrorChecking(boolean strictErrorChecking)
Not yet implemented.
|
void |
setXmlStandalone(boolean xmlStandalone)
Not yet implemented.
|
void |
setXmlVersion(String xmlVersion)
Not yet implemented.
|
asXml, cleanUp, clone, createAttribute, createCDATASection, createComment, createDocumentFragment, createDomDocumentFragment, createTextNode, getCanonicalXPath, getDoctype, getDocumentElement, getElementsByTagName, getEnclosingWindow, getNodeName, getNodeType, getPage, getUrl, getWebClient, getWebResponse, initialize, isHtmlPage, normalizeDocument, setEnclosingWindow
addCharacterDataChangeListener, addDomChangeListener, appendChild, asText, checkChildHierarchy, cloneNode, compareDocumentPosition, detach, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getAttributes, getBaseURI, getByXPath, getByXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadyState, getScriptableObject, getScriptObject, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, handles, hasAttributes, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isBlock, isDefaultNamespace, isDirectlyAttachedToPage, isDisplayed, isEqualNode, isSameNode, isSupported, isTrimmedText, lookupNamespaceURI, lookupPrefix, mayBeDisplayed, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, printXml, processImportNode, querySelector, querySelectorAll, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setNextSibling, setNodeValue, setParentNode, setPrefix, setPreviousSibling, setReadyState, setScriptableObject, setTextContent, setUserData
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public XmlPage(WebResponse webResponse, WebWindow enclosingWindow) throws IOException
webResponse
- the response from the serverenclosingWindow
- the window that holds the pageIOException
- if the page could not be createdpublic XmlPage(Node node, WebWindow enclosingWindow)
node
- the node to initialize this page withenclosingWindow
- the window that holds the pagepublic XmlPage(WebResponse webResponse, WebWindow enclosingWindow, boolean ignoreSAXException) throws IOException
webResponse
- the response from the serverenclosingWindow
- the window that holds the pageignoreSAXException
- Whether to ignore SAXException
or throw it as IOException
IOException
- if the page could not be createdpublic XmlPage(WebResponse webResponse, WebWindow enclosingWindow, boolean ignoreSAXException, boolean handleXHTMLAsHTML) throws IOException
webResponse
- the response from the serverenclosingWindow
- the window that holds the pageignoreSAXException
- Whether to ignore SAXException
or throw it as IOException
handleXHTMLAsHTML
- if true elements from the XHTML namespace are handled as HTML elements instead of
DOM elementsIOException
- if the page could not be createdpublic boolean hasCaseSensitiveTagNames()
true
if this page has case-sensitive tag names, false
otherwise. In general,
XML has case-sensitive tag names, and HTML doesn't. This is especially important during XPath matching.hasCaseSensitiveTagNames
in class SgmlPage
true
if this page has case-sensitive tag names, false
otherwise@Deprecated public String getContent()
SgmlPage.getWebResponse()
.getContentAsString()public Document getXmlDocument()
null
if the content couldn't be parsed@Deprecated public DomElement createXmlElement(String tagName)
createElement(String)
insteadtagName
- the tag name@Deprecated public DomElement createXmlElementNS(String namespaceURI, String qualifiedName)
createElementNS(String, String)
insteadnamespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiatepublic Attr createAttributeNS(String namespaceURI, String qualifiedName)
public DomElement createElement(String tagName)
createElement
in interface Document
createElement
in class SgmlPage
tagName
- the tag name which determines the type of element to be createdpublic DomElement createElementNS(String namespaceURI, String qualifiedName)
createElementNS
in interface Document
createElementNS
in class SgmlPage
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiatepublic EntityReference createEntityReference(String name)
public DomProcessingInstruction createProcessingInstruction(String target, String data)
public String getDocumentURI()
public DOMConfiguration getDomConfig()
@Deprecated public final Iterable<DomElement> getXmlElementDescendants()
DomNode.getDomElementDescendants()
insteadIterable
that will recursively iterate over all of this node's DomElement
descendants.Iterable
that will recursively iterate over all of this node's DomElement
descendantspublic NodeList getElementsByTagNameNS(String namespace, String name)
public DOMImplementation getImplementation()
public String getInputEncoding()
public boolean getStrictErrorChecking()
public String getXmlEncoding()
public boolean getXmlStandalone()
public String getXmlVersion()
public Node renameNode(Node n, String namespaceURI, String qualifiedName)
public void setDocumentURI(String documentURI)
public void setStrictErrorChecking(boolean strictErrorChecking)
public void setXmlStandalone(boolean xmlStandalone)
public void setXmlVersion(String xmlVersion)
public String getPageEncoding()
getPageEncoding
in class SgmlPage
protected void setDocumentType(DocumentType type)
setDocumentType
in class SgmlPage
type
- the document typeCopyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.