| java.lang.Object net.sf.saxon.dom.NodeOverNodeInfo net.sf.saxon.dom.ElementOverNodeInfo
ElementOverNodeInfo | public class ElementOverNodeInfo extends NodeOverNodeInfo implements Element(Code) | | This class is an implementation of the DOM Element class that wraps a Saxon NodeInfo
representation of an element node.
|
Method Summary | |
public String | getAttribute(String name) Retrieves an attribute value by name. | public String | getAttributeNS(String namespaceURI, String localName) Retrieves an attribute value by local name and namespace URI.
HTML-only DOM implementations do not need to implement this method.
Parameters: namespaceURI - The namespace URI of the attribute to retrieve. Parameters: localName - The local name of the attribute to retrieve. | public Attr | getAttributeNode(String name) Retrieves an attribute node by name.
Namespace declarations will not be retrieved.
To retrieve an attribute node by qualified name and namespace URI,
use the getAttributeNodeNS method.
Parameters: name - The name (nodeName ) of the attribute toretrieve. | public Attr | getAttributeNodeNS(String namespaceURI, String localName) Retrieves an Attr node by local name and namespace URI.
DOM method, so namespace declarations count as attributes.
Parameters: namespaceURI - The namespace URI of the attribute to retrieve. Parameters: localName - The local name of the attribute to retrieve. | public NodeList | getElementsByTagName(String name) Returns a NodeList of all descendant Elements
with a given tag name, in document order.
Parameters: name - The name of the tag to match on. | public NodeList | getElementsByTagNameNS(String namespaceURI, String localName) Returns a NodeList of all the descendant
Elements with a given local name and namespace URI in
document order.
Parameters: namespaceURI - The namespace URI of the elements to match on. | public TypeInfo | getSchemaTypeInfo() Get the schema type information for this node. | public String | getTagName() The name of the element (DOM interface). | public boolean | hasAttribute(String name) Returns true when an attribute with a given name is
specified on this element or has a default value, false
otherwise.
Namespace declarations will not be retrieved.
Parameters: name - The name of the attribute to look for. | public boolean | hasAttributeNS(String namespaceURI, String localName) Returns true when an attribute with a given local name
and namespace URI is specified on this element or has a default value,
false otherwise.
Namespace declarations will not be retrieved.
Parameters: namespaceURI - The namespace URI of the attribute to look for. Parameters: localName - The local name of the attribute to look for. | public void | removeAttribute(String oldAttr) Removes the specified attribute. | public void | removeAttributeNS(String namespaceURI, String localName) Removes an attribute by local name and namespace URI. | public Attr | removeAttributeNode(Attr oldAttr) Removes the specified attribute node. | public void | setAttribute(String name, String value) Adds a new attribute. | public void | setAttributeNS(String namespaceURI, String qualifiedName, String value) Adds a new attribute. | public Attr | setAttributeNode(Attr newAttr) Adds a new attribute node. | public Attr | setAttributeNodeNS(Attr newAttr) Add a new attribute. | public void | setIdAttribute(String name, boolean isId) | public void | setIdAttributeNS(String namespaceURI, String localName, boolean isId) | public void | setIdAttributeNode(Attr idAttr, boolean isId) |
getAttribute | public String getAttribute(String name)(Code) | | Retrieves an attribute value by name. Namespace declarations will not
be retrieved. DOM interface.
Parameters: name - The QName of the attribute to retrieve. The Attr value as a string, or the empty string ifthat attribute does not have a specified or default value. |
getAttributeNS | public String getAttributeNS(String namespaceURI, String localName)(Code) | | Retrieves an attribute value by local name and namespace URI.
HTML-only DOM implementations do not need to implement this method.
Parameters: namespaceURI - The namespace URI of the attribute to retrieve. Parameters: localName - The local name of the attribute to retrieve. The Attr value as a string, or the empty string ifthat attribute does not have a specified or default value. since: DOM Level 2 |
getAttributeNode | public Attr getAttributeNode(String name)(Code) | | Retrieves an attribute node by name.
Namespace declarations will not be retrieved.
To retrieve an attribute node by qualified name and namespace URI,
use the getAttributeNodeNS method.
Parameters: name - The name (nodeName ) of the attribute toretrieve. The Attr node with the specified name (nodeName ) or null if there is no suchattribute. |
getAttributeNodeNS | public Attr getAttributeNodeNS(String namespaceURI, String localName)(Code) | | Retrieves an Attr node by local name and namespace URI.
DOM method, so namespace declarations count as attributes.
Parameters: namespaceURI - The namespace URI of the attribute to retrieve. Parameters: localName - The local name of the attribute to retrieve. The Attr node with the specified attribute localname and namespace URI or null if there is no suchattribute. since: DOM Level 2 |
getElementsByTagName | public NodeList getElementsByTagName(String name)(Code) | | Returns a NodeList of all descendant Elements
with a given tag name, in document order.
Parameters: name - The name of the tag to match on. The special value "*"matches all tags. A list of matching Element nodes. |
getElementsByTagNameNS | public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException(Code) | | Returns a NodeList of all the descendant
Elements with a given local name and namespace URI in
document order.
Parameters: namespaceURI - The namespace URI of the elements to match on. Thespecial value "*" matches all namespaces. Parameters: localName - The local name of the elements to match on. Thespecial value "*" matches all local names. A new NodeList object containing all the matchedElements . throws: org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: May be raised if the implementation does notsupport the feature "XML" and the language exposedthrough the Document does not support XML Namespaces (such as [HTML 4.01]). since: DOM Level 2 |
getSchemaTypeInfo | public TypeInfo getSchemaTypeInfo()(Code) | | Get the schema type information for this node. Returns null for an untyped node.
|
getTagName | public String getTagName()(Code) | | The name of the element (DOM interface).
|
hasAttribute | public boolean hasAttribute(String name)(Code) | | Returns true when an attribute with a given name is
specified on this element or has a default value, false
otherwise.
Namespace declarations will not be retrieved.
Parameters: name - The name of the attribute to look for. true if an attribute with the given name isspecified on this element or has a default value, false otherwise. since: DOM Level 2 |
hasAttributeNS | public boolean hasAttributeNS(String namespaceURI, String localName)(Code) | | Returns true when an attribute with a given local name
and namespace URI is specified on this element or has a default value,
false otherwise.
Namespace declarations will not be retrieved.
Parameters: namespaceURI - The namespace URI of the attribute to look for. Parameters: localName - The local name of the attribute to look for. true if an attribute with the given local name andnamespace URI is specified or has a default value on this element,false otherwise. since: DOM Level 2 |
removeAttributeNS | public void removeAttributeNS(String namespaceURI, String localName) throws DOMException(Code) | | Removes an attribute by local name and namespace URI. Always fails
exception: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. since: DOM Level 2 |
setAttribute | public void setAttribute(String name, String value) throws DOMException(Code) | | Adds a new attribute. Always fails
Parameters: name - The name of the attribute to create or alter. Parameters: value - Value to set in string form. throws: org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name is not an XMLname according to the XML version in use specified in theDocument.xmlVersion attribute. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. |
setAttributeNS | public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException(Code) | | Adds a new attribute. Always fails.
Parameters: namespaceURI - The namespace URI of the attribute to create oralter. Parameters: qualifiedName - The qualified name of the attribute to create oralter. Parameters: value - The value to set in string form. exception: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. |
setAttributeNodeNS | public Attr setAttributeNodeNS(Attr newAttr) throws DOMException(Code) | | Add a new attribute. Always fails.
Parameters: newAttr - The Attr node to add to the attribute list. If the newAttr attribute replaces an existingattribute with the same local name and namespace URI , thereplaced Attr node is returned, otherwisenull is returned. exception: org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. since: DOM Level 2 |
|
|