public class XmlPage extends SgmlPage
Document
to allow to see the source of badly formed
xml responses.DomNode.ChildIterator, DomNode.DescendantElementsIterator
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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. |
createDomDocumentFragment, getEnclosingWindow, getNativePage, getNodeName, getNodeType, getWebClient, getWebResponse, initialize, setEnclosingWindow
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asText, asXml, cloneDomNode, cloneNode, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLocalName, getLog, getNamespaceURI, getNextDomSibling, getNextSibling, getNodeValue, getPage, getParentDomNode, getParentNode, getPrefix, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, hasAttributes, insertBefore, isAncestorOf, isRenderedVisible, isTrimmedText, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, printXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, removePropertyChangeListener, replace, setEventHandler, setEventHandler, setNextSibling, setNodeValue, setParentNode, setPrefix, setPreviousSibling, setReadyState
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 createdpublic void setScriptObject(org.mozilla.javascript.ScriptableObject scriptObject)
setScriptObject
in class DomNode
scriptObject
- The javascript object.public void cleanUp()
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 instantiateCopyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.