|
||||||||||
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
com.gargoylesoftware.htmlunit.xml.XmlPage
public class XmlPage
A page that will be returned for response with content type "text/xml".
It doesn't implement itself Document
to allow to see the source of badly formed
xml responses.
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 |
---|
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE |
Constructor Summary | |
---|---|
XmlPage(Node node,
WebWindow enclosingWindow)
Create an instance. |
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow)
Create an instance. |
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow,
boolean ignoreSAXException)
Create an instance. |
Method Summary | |
---|---|
void |
cleanUp()
Clean up this page. |
XmlElement |
createXmlElement(String tagName)
Create a new XML element with the given tag name. |
XmlElement |
createXmlElementNS(String namespaceURI,
String qualifiedName)
Create a new HtmlElement with the given namespace and qualified name. |
String |
getContent()
Return the content of the page |
XmlElement |
getDocumentXmlElement()
Get the root XmlElement of this document. |
Document |
getXmlDocument()
Gets the DOM representation of the xml content |
void |
setScriptObject(org.mozilla.javascript.ScriptableObject scriptObject)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Set the javascript object that corresponds to this node. |
Methods inherited from class com.gargoylesoftware.htmlunit.SgmlPage |
---|
createDomDocumentFragment, getEnclosingWindow, getNativePage, getNodeName, getNodeType, getWebClient, getWebResponse, initialize, setEnclosingWindow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlPage(WebResponse webResponse, WebWindow enclosingWindow) throws IOException
webResponse
- The response from the serverenclosingWindow
- The window that holds the page.
IOException
- If the page could not be createdpublic XmlPage(Node node, WebWindow enclosingWindow)
node
- The node to initialize this page with.enclosingWindow
- The window that holds the page.public XmlPage(WebResponse webResponse, WebWindow enclosingWindow, boolean ignoreSAXException) throws IOException
webResponse
- The response from the serverenclosingWindow
- The window that holds the page.ignoreSAXException
- Whether to ignore SAXException
or throw it as IOException
.
IOException
- If the page could not be createdMethod Detail |
---|
public void setScriptObject(org.mozilla.javascript.ScriptableObject scriptObject)
setScriptObject
in class DomNode
scriptObject
- The javascript object.public void cleanUp()
cleanUp
in interface Page
cleanUp
in class SgmlPage
public String getContent()
public Document getXmlDocument()
null
if the content couldn't be parsed.public XmlElement getDocumentXmlElement()
public XmlElement createXmlElement(String tagName)
tagName
- The tag name.
public XmlElement createXmlElementNS(String namespaceURI, String qualifiedName)
namespaceURI
- the URI that identifies an XML namespace.qualifiedName
- The qualified name of the element type to instantiate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |