|
|||||||||
| Home >> All >> org >> w3c >> [ tidy overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.w3c.tidy
Class DOMAttrImpl

java.lang.Objectorg.w3c.tidy.DOMNodeImpl
org.w3c.tidy.DOMAttrImpl
- All Implemented Interfaces:
- org.w3c.dom.Attr, org.w3c.dom.Node
- public class DOMAttrImpl
- extends DOMNodeImpl
- implements org.w3c.dom.Attr
- extends DOMNodeImpl
DOMAttrImpl (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.java for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000
- Version:
- 1.4, 1999/09/04 DOM Support, 1.5, 1999/10/23 Tidy Release 27 Sep 1999, 1.6, 1999/11/01 Tidy Release 22 Oct 1999, 1.7, 1999/12/06 Tidy Release 30 Nov 1999, 1.8, 2000/01/22 Tidy Release 13 Jan 2000, 1.9, 2000/06/03 Tidy Release 30 Apr 2000, 1.10, 2000/07/22 Tidy Release 8 Jul 2000, 1.11, 2000/08/16 Tidy Release 4 Aug 2000
| Field Summary | |
protected AttVal |
avAdaptee
|
| Fields inherited from class org.w3c.tidy.DOMNodeImpl |
adaptee |
| Constructor Summary | |
protected |
DOMAttrImpl(AttVal adaptee)
|
| Method Summary | |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Adds the node newChild to the end of the list of children
of this node. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
org.w3c.dom.NamedNodeMap |
getAttributes()
A NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise. |
org.w3c.dom.NodeList |
getChildNodes()
A NodeList that contains all children of this node. |
org.w3c.dom.Node |
getFirstChild()
The first child of this node. |
org.w3c.dom.Node |
getLastChild()
The last child of this node. |
java.lang.String |
getName()
Returns the name of this attribute. |
org.w3c.dom.Node |
getNextSibling()
The node immediately following this node. |
java.lang.String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
java.lang.String |
getNodeValue()
The value of this node, depending on its type; see the table above. |
org.w3c.dom.Document |
getOwnerDocument()
The Document object associated with this node. |
org.w3c.dom.Element |
getOwnerElement()
DOM2 - not implemented. |
org.w3c.dom.Node |
getParentNode()
The parent of this node. |
org.w3c.dom.Node |
getPreviousSibling()
The node immediately preceding this node. |
boolean |
getSpecified()
True if this attribute was explicitly given a value in
the instance document, false otherwise. |
java.lang.String |
getValue()
Returns value of this attribute. |
boolean |
hasChildNodes()
Returns whether this node has any children. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Inserts the node newChild before the existing child node
refChild. |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Removes the child node indicated by oldChild from the list
of children, and returns it. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Replaces the child node oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
setNodeValue(java.lang.String nodeValue)
The value of this node, depending on its type; see the table above. |
void |
setValue(java.lang.String value)
On retrieval, the value of the attribute is returned as a string. |
| Methods inherited from class org.w3c.tidy.DOMNodeImpl |
getLocalName, getNamespaceURI, getPrefix, hasAttributes, isSupported, normalize, setPrefix, supports |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Attr |
getSchemaTypeInfo, isId |
| Methods inherited from interface org.w3c.dom.Node |
compareDocumentPosition, getBaseURI, getFeature, getLocalName, getNamespaceURI, getPrefix, getTextContent, getUserData, hasAttributes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, setPrefix, setTextContent, setUserData |
| Field Detail |
avAdaptee
protected AttVal avAdaptee
| Constructor Detail |
DOMAttrImpl
protected DOMAttrImpl(AttVal adaptee)
| Method Detail |
getNodeValue
public java.lang.String getNodeValue() throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - The value of this node, depending on its type; see the table above.
When it is defined to be
null, setting it has no effect, including if the node is read-only.- Specified by:
getNodeValuein interfaceorg.w3c.dom.Node- Overrides:
getNodeValuein classDOMNodeImpl
setNodeValue
public void setNodeValue(java.lang.String nodeValue) throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - The value of this node, depending on its type; see the table above.
When it is defined to be
null, setting it has no effect, including if the node is read-only.- Specified by:
setNodeValuein interfaceorg.w3c.dom.Node- Overrides:
setNodeValuein classDOMNodeImpl
getNodeName
public java.lang.String getNodeName()
- Description copied from interface:
org.w3c.dom.Node - The name of this node, depending on its type; see the table above.
- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node- Overrides:
getNodeNamein classDOMNodeImpl
getNodeType
public short getNodeType()
- Description copied from interface:
org.w3c.dom.Node - A code representing the type of the underlying object, as defined above.
- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node- Overrides:
getNodeTypein classDOMNodeImpl
getParentNode
public org.w3c.dom.Node getParentNode()
- Description copied from interface:
org.w3c.dom.Node - The parent of this node. All nodes, except
Attr,Document,DocumentFragment,Entity, andNotationmay have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this isnull.- Specified by:
getParentNodein interfaceorg.w3c.dom.Node- Overrides:
getParentNodein classDOMNodeImpl
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
- Description copied from interface:
org.w3c.dom.Node - A
NodeListthat contains all children of this node. If there are no children, this is aNodeListcontaining no nodes.- Specified by:
getChildNodesin interfaceorg.w3c.dom.Node- Overrides:
getChildNodesin classDOMNodeImpl
getFirstChild
public org.w3c.dom.Node getFirstChild()
- Description copied from interface:
org.w3c.dom.Node - The first child of this node. If there is no such node, this returns
null.- Specified by:
getFirstChildin interfaceorg.w3c.dom.Node- Overrides:
getFirstChildin classDOMNodeImpl
getLastChild
public org.w3c.dom.Node getLastChild()
- Description copied from interface:
org.w3c.dom.Node - The last child of this node. If there is no such node, this returns
null.- Specified by:
getLastChildin interfaceorg.w3c.dom.Node- Overrides:
getLastChildin classDOMNodeImpl
getPreviousSibling
public org.w3c.dom.Node getPreviousSibling()
- Description copied from interface:
org.w3c.dom.Node - The node immediately preceding this node. If there is no such node,
this returns
null.- Specified by:
getPreviousSiblingin interfaceorg.w3c.dom.Node- Overrides:
getPreviousSiblingin classDOMNodeImpl
getNextSibling
public org.w3c.dom.Node getNextSibling()
- Description copied from interface:
org.w3c.dom.Node - The node immediately following this node. If there is no such node,
this returns
null.- Specified by:
getNextSiblingin interfaceorg.w3c.dom.Node- Overrides:
getNextSiblingin classDOMNodeImpl
getAttributes
public org.w3c.dom.NamedNodeMap getAttributes()
- Description copied from interface:
org.w3c.dom.Node - A
NamedNodeMapcontaining the attributes of this node (if it is anElement) ornullotherwise.- Specified by:
getAttributesin interfaceorg.w3c.dom.Node- Overrides:
getAttributesin classDOMNodeImpl
getOwnerDocument
public org.w3c.dom.Document getOwnerDocument()
- Description copied from interface:
org.w3c.dom.Node - The
Documentobject associated with this node. This is also theDocumentobject used to create new nodes. When this node is aDocumentor aDocumentTypewhich is not used with anyDocumentyet, this isnull.- Specified by:
getOwnerDocumentin interfaceorg.w3c.dom.Node- Overrides:
getOwnerDocumentin classDOMNodeImpl
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - Inserts the node
newChildbefore the existing child noderefChild. IfrefChildisnull, insertnewChildat the end of the list of children.
IfnewChildis aDocumentFragmentobject, all of its children are inserted, in the same order, beforerefChild. If thenewChildis already in the tree, it is first removed.Note: Inserting a node before itself is implementation dependent.
- Specified by:
insertBeforein interfaceorg.w3c.dom.Node- Overrides:
insertBeforein classDOMNodeImpl
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - Replaces the child node
oldChildwithnewChildin the list of children, and returns theoldChildnode.
IfnewChildis aDocumentFragmentobject,oldChildis replaced by all of theDocumentFragmentchildren, which are inserted in the same order. If thenewChildis already in the tree, it is first removed.Note: Replacing a node with itself is implementation dependent.
- Specified by:
replaceChildin interfaceorg.w3c.dom.Node- Overrides:
replaceChildin classDOMNodeImpl
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - Removes the child node indicated by
oldChildfrom the list of children, and returns it.- Specified by:
removeChildin interfaceorg.w3c.dom.Node- Overrides:
removeChildin classDOMNodeImpl
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
- Description copied from interface:
org.w3c.dom.Node - Adds the node
newChildto the end of the list of children of this node. If thenewChildis already in the tree, it is first removed.- Specified by:
appendChildin interfaceorg.w3c.dom.Node- Overrides:
appendChildin classDOMNodeImpl
hasChildNodes
public boolean hasChildNodes()
- Description copied from interface:
org.w3c.dom.Node - Returns whether this node has any children.
- Specified by:
hasChildNodesin interfaceorg.w3c.dom.Node- Overrides:
hasChildNodesin classDOMNodeImpl
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
- Description copied from interface:
org.w3c.dom.Node - Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes. The duplicate node has no parent (
parentNodeisnull) and no user data. User data associated to the imported node is not carried over. However, if anyUserDataHandlershas been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns.
Cloning anElementcopies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any children it contains unless it is a deep clone. This includes text contained in an theElementsince the text is contained in a childTextnode. Cloning anAttrdirectly, as opposed to be cloned as part of anElementcloning operation, returns a specified attribute (specifiedistrue). Cloning anAttralways clones its children, since they represent its value, no matter whether this is a deep clone or not. Cloning anEntityReferenceautomatically constructs its subtree if a correspondingEntityis available, no matter whether this is a deep clone or not. Cloning any other type of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy, but the children of anEntityReferenceclone are readonly . In addition, clones of unspecifiedAttrnodes are specified. And, cloningDocument,DocumentType,Entity, andNotationnodes is implementation dependent.- Specified by:
cloneNodein interfaceorg.w3c.dom.Node- Overrides:
cloneNodein classDOMNodeImpl
getName
public java.lang.String getName()
- Description copied from interface:
org.w3c.dom.Attr - Returns the name of this attribute. If
Node.localNameis different fromnull, this attribute is a qualified name.- Specified by:
getNamein interfaceorg.w3c.dom.Attr
getSpecified
public boolean getSpecified()
- Description copied from interface:
org.w3c.dom.Attr Trueif this attribute was explicitly given a value in the instance document,falseotherwise. If the application changed the value of this attribute node (even if it ends up having the same value as the default value) then it is set totrue. The implementation may handle attributes with default values from other schemas similarly but applications should useDocument.normalizeDocument()to guarantee this information is up-to-date.- Specified by:
getSpecifiedin interfaceorg.w3c.dom.Attr
getValue
public java.lang.String getValue()
- Returns value of this attribute. If this attribute has a null value,
then the attribute name is returned instead.
Thanks to Brett Knights
for this fix. - Specified by:
getValuein interfaceorg.w3c.dom.Attr
setValue
public void setValue(java.lang.String value)
- Description copied from interface:
org.w3c.dom.Attr - On retrieval, the value of the attribute is returned as a string.
Character and general entity references are replaced with their
values. See also the method
getAttributeon theElementinterface.
On setting, this creates aTextnode with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the methodElement.setAttribute().
Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.- Specified by:
setValuein interfaceorg.w3c.dom.Attr
getOwnerElement
public org.w3c.dom.Element getOwnerElement()
- DOM2 - not implemented.
- Specified by:
getOwnerElementin interfaceorg.w3c.dom.Attr
|
|||||||||
| Home >> All >> org >> w3c >> [ tidy overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC