Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.xml
Class QAttr

    java.lang.Object
      |
      +--com.caucho.xml.QAbstractNode
            |
            +--com.caucho.xml.QNode
                  |
                  +--com.caucho.xml.QAttr

All Implemented Interfaces:
  Attr, CauchoNode, Node, NodeList

public class QAttr
extends QNode
implements Attr

Fields inherited from class com.caucho.xml.QAbstractNode
`L`

Fields inherited from interface org.w3c.dom.Node
`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`

Method Summary
`java.lang.String` | `getCanonicalName()` Returns the node's canonical name.
`java.lang.String` | `getLocalName()` Returns the local part of the qualified name of this node.
`java.lang.String` | `getName()` Returns the name of this attribute.
`java.lang.String` | `getNamespaceURI()` The namespace URI of this node, or `null` if it is unspecified.
`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.
`Element` | `getOwnerElement()` The `Element` node this attribute is attached to or `null` if this attribute is not in use.
`java.lang.String` | `getPrefix()` The namespace prefix of this node, or `null` if it is unspecified.
`boolean` | `getSpecified()` If this attribute was explicitly given a value in the original document, this is `true`; otherwise, it is `false`.
`java.lang.String` | `getValue()` On retrieval, the value of the attribute is returned as a string.
`void` | `print(XmlPrinter out)`
`void` | `setNodeValue(java.lang.String value)` The value of this node, depending on its type; see the table above.
`void` | `setSpecified(boolean specified)`
`void` | `setValue(java.lang.String value)` On retrieval, the value of the attribute is returned as a string.
`java.lang.String` | `toString()`

Methods inherited from class com.caucho.xml.QNode
`appendChild, checkValid, equals, equals, getAttributes, getChildNodes, getFirstChild, getLastChild, getLength, getNextPreorder, getNextSibling, getPreviousSibling, hasChildNodes, insertBefore, item, normalize, removeChild, replaceChild`

Methods inherited from class com.caucho.xml.QAbstractNode
`cloneNode, getColumn, getFilename, getLine, getNextContent, getOwnerDocument, getParentNode, getPreviousContent, getTextValue, hasAttributes, hasContent, isSupported, print, printHtml, printPretty, setLocation, setPrefix, supports`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.w3c.dom.Node
`appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix`

Method Detail

### getOwnerElement

    public Element getOwnerElement()

  Description copied from interface: `Attr`
  The `Element` node this attribute is attached to or `null` if this attribute is not in use.
  Specified by:
    `getOwnerElement` in interface `Attr`

### getNodeType

    public short getNodeType()

  Description copied from interface: `Node`
  A code representing the type of the underlying object, as defined above.
  Specified by:
    `getNodeType` in interface `Node`

### getNodeName

    public java.lang.String getNodeName()

  Description copied from interface: `Node`
  The name of this node, depending on its type; see the table above.
  Specified by:
    `getNodeName` in interface `Node`

### getName

    public java.lang.String getName()

  Description copied from interface: `Attr`
  Returns the name of this attribute.
  Specified by:
    `getName` in interface `Attr`

### getPrefix

    public java.lang.String getPrefix()

  Description copied from interface: `Node`
  The namespace prefix of this node, or `null` if it is unspecified.
  Note that setting this attribute, when permitted, changes the `nodeName` attribute, which holds the qualified name, as well as the `tagName` and `name` attributes of the `Element` and `Attr` interfaces, when applicable.
  Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the `namespaceURI` and `localName` do not change.
  For nodes of any type other than `ELEMENT_NODE` and `ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, such as `createElement` from the `Document` interface, this is always `null`.
  Specified by:
    `getPrefix` in interface `Node`
  Overrides:
    `getPrefix` in class `QAbstractNode`
  Following copied from interface: `org.w3c.dom.Node`
  Throws:
    `DOMException` - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character, per the XML 1.0 specification .
    NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
    NAMESPACE_ERR: Raised if the specified `prefix` is malformed per the Namespaces in XML specification, if the `namespaceURI` of this node is `null`, if the specified prefix is "xml" and the `namespaceURI` of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the `namespaceURI` of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the `qualifiedName` of this node is "xmlns" .

### getLocalName

    public java.lang.String getLocalName()

  Description copied from interface: `Node`
  Returns the local part of the qualified name of this node.
  For nodes of any type other than `ELEMENT_NODE` and `ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, such as `createElement` from the `Document` interface, this is always `null`.
  Specified by:
    `getLocalName` in interface `Node`
  Overrides:
    `getLocalName` in class `QAbstractNode`

### getCanonicalName

    public java.lang.String getCanonicalName()

  Description copied from interface: `CauchoNode`
  Returns the node's canonical name.

  e.g. for foo:bar:baz, the prefix name might be '{/caucho/1.0}baz'

  Overrides:
    `getCanonicalName` in class `QAbstractNode`

### getNamespaceURI

    public java.lang.String getNamespaceURI()

  Description copied from interface: `Node`
  The namespace URI of this node, or `null` if it is unspecified.
  This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
  For nodes of any type other than `ELEMENT_NODE` and `ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, such as `createElement` from the `Document` interface, this is always `null`.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.
  Specified by:
    `getNamespaceURI` in interface `Node`
  Overrides:
    `getNamespaceURI` in class `QAbstractNode`

### getNodeValue

    public java.lang.String getNodeValue()

  Description copied from interface: `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.
  Specified by:
    `getNodeValue` in interface `Node`
  Overrides:
    `getNodeValue` in class `QNode`
  Following copied from interface: `org.w3c.dom.Node`
  Throws:
    `DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
    `DOMException` - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a `DOMString` variable on the implementation platform.

### setNodeValue

    public void setNodeValue(java.lang.String value)

  Description copied from interface: `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.
  Specified by:
    `setNodeValue` in interface `Node`
  Overrides:
    `setNodeValue` in class `QNode`
  Following copied from interface: `org.w3c.dom.Node`
  Throws:
    `DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
    `DOMException` - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a `DOMString` variable on the implementation platform.

### getValue

    public java.lang.String getValue()

  Description copied from interface: `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 `getAttribute` on the `Element` interface.
  On setting, this creates a `Text` node 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 method `setAttribute` on the `Element` interface.
  Specified by:
    `getValue` in interface `Attr`
  Following copied from interface: `org.w3c.dom.Attr`
  Throws:
    `DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

### setValue

    public void setValue(java.lang.String value)

  Description copied from interface: `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 `getAttribute` on the `Element` interface.
  On setting, this creates a `Text` node 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 method `setAttribute` on the `Element` interface.
  Specified by:
    `setValue` in interface `Attr`
  Following copied from interface: `org.w3c.dom.Attr`
  Throws:
    `DOMException` - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

### getSpecified

    public boolean getSpecified()

  Description copied from interface: `Attr`
  If this attribute was explicitly given a value in the original document, this is `true`; otherwise, it is `false`. Note that the implementation is in charge of this attribute, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the `specified` flag is automatically flipped to `true`. To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with `specified` set to `false` and the default value (if one exists).
  In summary: If the attribute has an assigned value in the document then `specified` is `true`, and the value is the assigned value.If the attribute has no assigned value in the document and has a default value in the DTD, then `specified` is `false`, and the value is the default value in the DTD.If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, then the attribute does not appear in the structure model of the document.If the `ownerElement` attribute is `null` (i.e. because it was just created or was set to `null` by the various removal and cloning operations) `specified` is `true`.
  Specified by:
    `getSpecified` in interface `Attr`

### setSpecified

    public void setSpecified(boolean specified)

### print

    public void print(XmlPrinter out)
               throws java.io.IOException

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD