public class XMLDocument extends Document
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
XMLDocument()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
getWithPreemption(String name)
Calls to document.XYZ should first look at elements named XYZ before
using standard functions.
|
Object |
jsxFunction_getElementById(String id)
Return the element with the specified id or null if that element could
not be found
|
Object |
jsxFunction_getElementsByTagName(String tagName)
Returns all the descendant elements with the specified tag name.
|
boolean |
jsxFunction_load(String xmlSrouce)
Loads an XML document from the specified location.
|
boolean |
jsxFunction_loadXML(String strXML)
Loads an XML document using the supplied string
|
HTMLCollection |
jsxFunction_selectNodes(String expression)
Applies the specified xpath expression to this node's context and returns the generated list of matching nodes.
|
Object |
jsxFunction_selectSingleNode(String expression)
Applies the specified pattern-matching operation to this node's context and returns the first matching node.
|
void |
jsxFunction_setProperty(String name,
String value)
This method is used to set
second-level properties
on the DOM object.
|
boolean |
jsxGet_async()
Returns Whether or not to send the request to the server asynchronously.
|
Object |
jsxGet_body()
Returns
Scriptable#NOT_FOUND
Returns this document's body element. |
SimpleScriptable |
jsxGet_documentElement()
Get the JavaScript property "documentElement" for the document.
|
XMLDOMParseError |
jsxGet_parseError()
Get the JavaScript property "parseError" for the document.
|
boolean |
jsxGet_preserveWhiteSpace()
Gets the current white space handling.
|
String |
jsxGet_xml()
Contains the XML representation of the node and all its descendants.
|
void |
jsxSet_async(boolean async)
Sets the async attribute.
|
void |
jsxSet_preserveWhiteSpace(boolean preserveWhiteSpace)
Specifies the white space handling.
|
SimpleScriptable |
makeScriptableFor(DomNode domNode)
Builds a new the javascript object that corresponds to the specified object.
|
getHtmlPage, getHtmlPageOrNull, jsConstructor, jsxFunction_close, jsxFunction_createAttribute, jsxFunction_createDocumentFragment, jsxFunction_createElement, jsxFunction_createElementNS, jsxFunction_createEvent, jsxFunction_createEventObject, jsxFunction_createNSResolver, jsxFunction_createRange, jsxFunction_createStyleSheet, jsxFunction_createTextNode, jsxFunction_elementFromPoint, jsxFunction_evaluate, jsxFunction_getBoxObjectFor, jsxFunction_getElementsByName, jsxFunction_open, jsxFunction_write, jsxFunction_writeln, jsxGet_all, jsxGet_anchors, jsxGet_cookie, jsxGet_defaultView, jsxGet_domain, jsxGet_forms, jsxGet_frames, jsxGet_images, jsxGet_implementation, jsxGet_links, jsxGet_location, jsxGet_parentWindow, jsxGet_readyState, jsxGet_referrer, jsxGet_scripts, jsxGet_styleSheets, jsxGet_title, jsxGet_URL, jsxSet_cookie, jsxSet_domain, jsxSet_location, jsxSet_title, write
executeEvent, fireEvent, getEventHandler, getEventHandlerProp, getJavaScriptNode, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler, setEventHandlerProp
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getIntArg, getLog, getObjectArg, getPrototype, getScriptableFor, getStartingScope, getStringArg, getTransformerScriptableFor, getWindow, getWindow, setDomNode, setDomNode, setHtmlElement
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
public XMLDocument()
public void jsxSet_async(boolean async)
async
- Whether or not to send the request to the server asynchronously.public boolean jsxGet_async()
public boolean jsxFunction_load(String xmlSrouce)
xmlSrouce
- A string containing a URL that specifies the location of the XML file.public boolean jsxFunction_loadXML(String strXML)
strXML
- A string containing the XML string to load into this XML document object.
This string can contain an entire XML document or a well-formed fragment.protected Object getWithPreemption(String name)
Called by SimpleScriptable.get(String, Scriptable)
to allow retrieval of the property before the prototype
chain is searched.
IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!
getWithPreemption
in class Document
name
- the property nameScriptable.NOT_FOUND
if not foundpublic SimpleScriptable makeScriptableFor(DomNode domNode)
makeScriptableFor
in class SimpleScriptable
domNode
- the dom node for which a JS object should be createdpublic SimpleScriptable jsxGet_documentElement()
jsxGet_documentElement
in class Document
public XMLDOMParseError jsxGet_parseError()
public String jsxGet_xml()
public boolean jsxGet_preserveWhiteSpace()
public void jsxSet_preserveWhiteSpace(boolean preserveWhiteSpace)
preserveWhiteSpace
- white space handling.public void jsxFunction_setProperty(String name, String value)
name
- The name of the property to be set.value
- The value of the specified property.public HTMLCollection jsxFunction_selectNodes(String expression)
expression
- A string specifying an XPath expression.public Object jsxFunction_selectSingleNode(String expression)
expression
- A string specifying an XPath expression.public Object jsxFunction_getElementsByTagName(String tagName)
jsxFunction_getElementsByTagName
in class Document
tagName
- the name to search for.public Object jsxGet_body()
Scriptable#NOT_FOUND
Returns this document's body element.jsxGet_body
in class Document
public Object jsxFunction_getElementById(String id)
jsxFunction_getElementById
in class Document
id
- The ID to search forCopyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.