|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.html.DomNode
com.gargoylesoftware.htmlunit.SgmlPage
public abstract class SgmlPage
A basic class to be implemented by HtmlPage
and
XmlPage
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode |
---|
DomNode.ChildIterator, DomNode.DescendantElementsIterator |
Field Summary |
---|
Fields inherited from class com.gargoylesoftware.htmlunit.html.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 |
Fields inherited from interface org.w3c.dom.Node |
---|
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 Summary | |
---|---|
SgmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an instance of SgmlPage. |
Method Summary | |
---|---|
java.lang.String |
asXml()
Returns a string representation of the XML document from this element and all it's children (recursively). |
void |
cleanUp()
Clean up this page. |
protected SgmlPage |
clone()
Creates a clone of this instance, and clears cached state to be not shared with the original. |
DomDocumentFragment |
createDomDocumentFragment()
Creates an empty DomDocumentFragment object. |
abstract org.w3c.dom.Element |
createElement(java.lang.String tagName)
Creates an element, the type of which depends on the specified tag name. |
abstract org.w3c.dom.Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Create a new Element with the given namespace and qualified name. |
org.w3c.dom.DocumentType |
getDoctype()
Returns the document type. |
DomElement |
getDocumentElement()
Returns the document element. |
WebWindow |
getEnclosingWindow()
Returns the window that this page is sitting inside. |
java.lang.String |
getNodeName()
Gets the name for the current node. |
short |
getNodeType()
Gets the type of the current node. |
SgmlPage |
getPage()
Returns the page that contains this node. |
abstract java.lang.String |
getPageEncoding()
Returns the page encoding. |
WebClient |
getWebClient()
Returns the WebClient that originally loaded this page. |
WebResponse |
getWebResponse()
Returns the web response that was originally used to create this page. |
abstract boolean |
hasCaseSensitiveTagNames()
Returns true if this page has case-sensitive tag names, false otherwise. |
void |
initialize()
Initialize this page. |
void |
normalizeDocument()
The current implementation just DomNode.normalize() s the document element. |
protected void |
setDocumentType(DomDocumentType type)
Sets the document type. |
void |
setEnclosingWindow(WebWindow window)
Sets the window that contains this page. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Document |
---|
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion |
Methods inherited from interface org.w3c.dom.Node |
---|
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 |
Constructor Detail |
---|
public SgmlPage(WebResponse webResponse, WebWindow webWindow)
webResponse
- the web response that was used to create this pagewebWindow
- the window that this page is being loaded intoMethod Detail |
---|
public void cleanUp() throws java.io.IOException
cleanUp
in interface Page
java.io.IOException
- if an IO problem occurspublic WebResponse getWebResponse()
getWebResponse
in interface Page
public void initialize() throws java.io.IOException
initialize
in interface Page
java.io.IOException
- if an IO problem occurspublic java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class DomNode
public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
getNodeType
in class DomNode
public WebWindow getEnclosingWindow()
getEnclosingWindow
in interface Page
public void setEnclosingWindow(WebWindow window)
window
- the new frame or null if this page is being removed from a framepublic WebClient getWebClient()
public DomDocumentFragment createDomDocumentFragment()
DomDocumentFragment
object.
DomDocumentFragment
public final org.w3c.dom.DocumentType getDoctype()
getDoctype
in interface org.w3c.dom.Document
protected void setDocumentType(DomDocumentType type)
type
- the document typepublic SgmlPage getPage()
getPage
in class DomNode
public abstract org.w3c.dom.Element createElement(java.lang.String tagName)
createElement
in interface org.w3c.dom.Document
tagName
- the tag name which determines the type of element to be created
public abstract org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
createElementNS
in interface org.w3c.dom.Document
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiate
public abstract java.lang.String getPageEncoding()
public DomElement getDocumentElement()
getDocumentElement
in interface org.w3c.dom.Document
protected SgmlPage clone()
clone
in class java.lang.Object
public java.lang.String asXml()
asXml
in class DomNode
public abstract boolean hasCaseSensitiveTagNames()
public void normalizeDocument()
DomNode.normalize()
s the document element.
normalizeDocument
in interface org.w3c.dom.Document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |