com.gargoylesoftware.htmlunit.activex.javascript.msxml
Class XMLDOMAttribute

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLScriptable
              extended by com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMNode
                  extended by com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMAttribute
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class XMLDOMAttribute
extends XMLDOMNode

A JavaScript object for MSXML's (ActiveX) XMLDOMAttribute.
Represents an attribute of the IXMLDOMElement. Valid and default values for the attribute are defined in a document type definition (DTD) or schema.

Version:
$Revision: 9017 $
Author:
Sudhan Moghe, Frank Danek
See Also:
MSDN documentation, Serialized Form

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
XMLDOMAttribute()
          Creates an instance.
 
Method Summary
 void detachFromParent()
          Detaches this attribute from the parent HTML element after caching the attribute value.
 XMLDOMNodeList getChildNodes()
          Returns a node list containing the child nodes.
 DomAttr getDomNodeOrDie()
          Returns the DOM node that corresponds to this JavaScript object or throw an exception if one cannot be found.
 XMLDOMNode getFirstChild()
          Returns the first child of the attribute.
 XMLDOMNode getLastChild()
          Returns the last child attribute.
 String getName()
          Returns the attribute name.
 String getNodeValue()
          Returns the text associated with the attribute.
 Node getParentNode()
          Returns the parent node.
 boolean getSpecified()
          Indicates whether the attribute is explicitly specified or derived from a default value in the document type definition (DTD) or schema.
 Object getText()
          Returns a string representing the value of the attribute with entities expanded.
 String getValue()
          Returns the attribute value.
 String getXml()
          Returns the XML representation of the node and all its descendants.
 void setNodeValue(String value)
          Sets the text associated with the attribute.
 void setText(Object value)
          Sets the text content of the attribute.
 void setValue(String value)
          Sets the attribute value.
 
Methods inherited from class com.gargoylesoftware.htmlunit.activex.javascript.msxml.XMLDOMNode
appendChild, cloneNode, getAttributes, getBaseName, getDataType, getDefinition, getJavaScriptNode, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getPrefix, getPreviousSibling, 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

XMLDOMAttribute

public XMLDOMAttribute()
Creates an instance. JavaScript objects must have a default constructor.

Method Detail

getChildNodes

public XMLDOMNodeList getChildNodes()
Returns a node list containing the child nodes.

Overrides:
getChildNodes in class XMLDOMNode
Returns:
a node list containing the child nodes

getFirstChild

public XMLDOMNode getFirstChild()
Returns the first child of the attribute.

Overrides:
getFirstChild in class XMLDOMNode
Returns:
the first child of the attribute

getLastChild

public XMLDOMNode getLastChild()
Returns the last child attribute.

Overrides:
getLastChild in class XMLDOMNode
Returns:
the last child attribute

getName

public String getName()
Returns the attribute name.

Returns:
the attribute name

getNodeValue

public String getNodeValue()
Returns the text associated with the attribute.

Overrides:
getNodeValue in class XMLDOMNode
Returns:
the text associated with the attribute

setNodeValue

public void setNodeValue(String value)
Sets the text associated with the attribute.

Overrides:
setNodeValue in class XMLDOMNode
Parameters:
value - the new text associated with the attribute

getParentNode

public Node getParentNode()
Returns the parent node.

Overrides:
getParentNode in class XMLDOMNode
Returns:
null

getSpecified

public boolean getSpecified()
Indicates whether the attribute is explicitly specified or derived from a default value in the document type definition (DTD) or schema.

Returns:
true if this attribute has been explicitly specified

getText

public Object getText()
Returns a string representing the value of the attribute with entities expanded.

Overrides:
getText in class XMLDOMNode
Returns:
the value of this attribute

setText

public void setText(Object value)
Sets the text content of the attribute.

Overrides:
setText in class XMLDOMNode
Parameters:
value - the text content of the attribute

getValue

public String getValue()
Returns the attribute value.

Returns:
the attribute value

setValue

public void setValue(String value)
Sets the attribute value.

Parameters:
value - the new attribute value

getXml

public String getXml()
Returns the XML representation of the node and all its descendants.

Overrides:
getXml in class XMLDOMNode
Returns:
the XML representation of the node and all its descendants

detachFromParent

public void detachFromParent()
Detaches this attribute from the parent HTML element after caching the attribute value.


getDomNodeOrDie

public DomAttr getDomNodeOrDie()
                        throws IllegalStateException
Returns the DOM node that corresponds to this JavaScript object or throw an exception if one cannot be found.

Overrides:
getDomNodeOrDie in class SimpleScriptable
Returns:
the DOM node
Throws:
IllegalStateException - If the DOM node could not be found.


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.