|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLScriptable
com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMNode
com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMElement
public class XMLDOMElement
A JavaScript object for MSXML's (ActiveX) XMLDOMElement.
Represents the element object.
| Field Summary |
|---|
| Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
|---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
| Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable |
|---|
NOT_FOUND |
| Constructor Summary | |
|---|---|
XMLDOMElement()
Creates an instance. |
|
| Method Summary | |
|---|---|
protected XMLDOMNamedNodeMap |
createAttributesObject()
Creates the JS object for the property attributes. |
Object |
getAttribute(String name)
Returns the value of the attribute. |
Object |
getAttributeNode(String name)
Returns the attribute node. |
Object |
getAttributes()
Returns the list of attributes for this element. |
DomElement |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw an exception if one cannot be found. |
XMLDOMNodeList |
getElementsByTagName(String tagName)
Returns a list of all descendant elements that match the supplied name. |
String |
getTagName()
Returns the element name. |
String |
getText()
Returns a string that represents the element content. |
void |
normalize()
Normalizes all descendant elements by combining two or more adjacent text nodes into one unified text node. |
void |
removeAttribute(String name)
Removes the named attribute. |
XMLDOMAttribute |
removeAttributeNode(XMLDOMAttribute att)
Removes the specified attribute from this element. |
void |
setAttribute(String name,
String value)
Sets the value of the named attribute. |
XMLDOMAttribute |
setAttributeNode(XMLDOMAttribute newAtt)
Sets or updates the supplied attribute node on this element. |
void |
setNodeValue(String newValue)
Attempting to set the value of elements generates an error. |
void |
setText(Object value)
Replaces all children of this element with the supplied value. |
| Methods inherited from class com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMNode |
|---|
appendChild, cloneNode, getBaseName, getChildNodes, getDataType, getDefinition, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getXml, hasChildNodes, insertBefore, insertBeforeImpl, removeChild, replaceChild, selectNodes, selectSingleNode |
| Methods inherited from class com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLScriptable |
|---|
getClassName, getEnvironment, getPrototype, makeScriptableFor, setEnvironment, setParentScope |
| Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
|---|
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getDefaultValue, getDomNodeOrNull, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, setCaseSensitive, setDomNode, setDomNode, setHtmlElement |
| Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject |
|---|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLDOMElement()
| Method Detail |
|---|
public Object getAttributes()
getAttributes in class XMLDOMNodeprotected XMLDOMNamedNodeMap createAttributesObject()
public void setNodeValue(String newValue)
setNodeValue in class XMLDOMNodenewValue - the new value to setpublic String getTagName()
public String getText()
getText in class XMLDOMNodepublic void setText(Object value)
setText in class XMLDOMNodevalue - the new value for the contents of this nodepublic Object getAttribute(String name)
name - the name of the attribute to return
null if the named attribute does not have a
specified valuepublic Object getAttributeNode(String name)
name - the name of the attribute to return
null if the named attribute cannot be found
on this elementpublic void removeAttribute(String name)
name - the name of the attribute to be removedpublic XMLDOMAttribute removeAttributeNode(XMLDOMAttribute att)
att - the attribute to be removed from this element
public void setAttribute(String name,
String value)
name - the name of the attribute; if the attribute with that name already exists, its value is changedvalue - the value for the named attributepublic XMLDOMAttribute setAttributeNode(XMLDOMAttribute newAtt)
newAtt - the attribute node to be associated with this element
null otherwisepublic XMLDOMNodeList getElementsByTagName(String tagName)
tagName - the name of the element to find; the tagName value '*' matches all descendant elements of this
element
public void normalize()
public DomElement getDomNodeOrDie()
getDomNodeOrDie in class SimpleScriptable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||