oracle.xml.parser.v2
Class XMLElement

java.lang.Object
  |
  +--oracle.xml.parser.v2.XMLNode
        |
        +--oracle.xml.parser.v2.XMLNSNode
              |
              +--oracle.xml.parser.v2.XMLElement
Direct Known Subclasses:
XMLDocument, XMLDocumentFragment

public class XMLElement
extends XMLNSNode
implements Element, NSName, NSResolver, java.io.Externalizable, CXMLConstants

See Also:
Element, XMLParser, NodeFactory, DOMParser.setNodeFactory(oracle.xml.parser.v2.NodeFactory), Serialized Form

Fields inherited from class oracle.xml.parser.v2.XMLNode
ATTRDECL, Auto_Events, capturing, DOMAttrModified, DOMCharacterDataModified, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified, ELEMENTDECL, noncapturing, RANGE_DELETE_EVENT, RANGE_DELETETEXT_EVENT, RANGE_INSERT_EVENT, RANGE_INSERTTEXT_EVENT, RANGE_REPLACE_EVENT, RANGE_SETTEXT_EVENT, TRAVERSAL_DELETE_EVENT, TRAVERSAL_REPLACE_EVENT, XMLDECL_NODE
 
Fields inherited from interface oracle.xml.comp.CXMLConstants
ATTR_DEF, ATTR_TOKEN, ATTRDECL_DEF, CDATA_DEF, CHAR_DEF, COMMENT_DEF, CXML_VERSION, cXMLFILE, cXMLFILE_LEN, DEBUG, DTD_DEF, ELEMENTDECL_DEF, END, ENTITY_DEF, ENTITYREF_DEF, META_ID_MAX, names, NOTATION_DEF, NS_DEF, NULLSTR, PI_DEF, PREFIX_DEF, TAG_DEF, TAG_TOKEN, TOKEN_ONLY, XMLDECL_DEF
 
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
 
Constructor Summary
XMLElement()
          Deprecated. use createElement(String) method of XMLDocument
XMLElement(java.lang.String tag)
          Deprecated. use createElement(String) method of XMLDocument
XMLElement(java.lang.String name, java.lang.String prefix, java.lang.String namespace)
          Deprecated. use createElementNS(String, String) method of XMLDocument
XMLElement(java.lang.String name, java.lang.String prefix, java.lang.String qname, java.lang.String namespace)
          Private constructor doesn't intern names Creates an element with the given name, prefix, and namespace
 
Method Summary
TypeMethod
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 java.lang.String getAttribute(java.lang.String name)
          Retrieves an attribute value by name.
 Attr getAttributeNode(java.lang.String name)
          Retrieves an Attr node by name.
 Attr getAttributeNode(java.lang.String name, java.lang.String namespace)
          Deprecated. As of DOM 2
 Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
          Retrieves an Attr node by local name and namespace URI.
 java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Retrieves an attribute value by local name and namespace URI.
 NamedNodeMap getAttributes()
          A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
 NodeList getChildrenByTagName(java.lang.String name)
          Returns a NodeList of all immediate children with a given tag name,
 NodeList getChildrenByTagName(java.lang.String name, java.lang.String ns)
          Returns a NodeList of all immediate children with a given tag name and namespace
 NodeList getElementsByTagName(java.lang.String name)
          Returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree.
 NodeList getElementsByTagName(java.lang.String name, java.lang.String ns)
          Deprecated. As of DOM 2
 NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
          Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree.
 java.lang.String getExpandedName()
          Get the fully resolved name for this element.
 XMLNode getFirstAttribute()
          Retrieves the first Attr.
 java.lang.String getLocalName()
          Gets the local Name for this element.
 java.lang.String getNamespace()
          Deprecated. As of DOM 2
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 short getNodeType()
          Gets a code representing the type of the underlying object
 java.lang.String getPrefix()
          Get the namespace prefix for this element.
 java.lang.String getQualifiedName()
          Get the qualified name for this element.
 java.lang.String getTagName()
          Gets the name of the element.
 boolean hasAttribute(java.lang.String name)
          Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
 boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.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.
 boolean hasAttributes()
          Returns whether this node (if it is an element) has any attributes.
 void normalize()
          Deprecated. As of DOM 2
 void readExternal(java.io.ObjectInput inArg)
          This method restores the information written by writeExternal by reading the input stream and regenerating the objects as per the information of the input stream.
 void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
          This method restores the information written by writeExternal by reading the input stream and regenerating the objects as per the information of the input stream.
 void removeAttribute(java.lang.String name)
          Removes an attribute by name.
 Attr removeAttributeNode(Attr oldAttr)
          Removes the specified attribute.
 void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Removes an attribute by local name and namespace URI.
 void reportSAXEvents(ContentHandler cntHandler)
          Report SAX Events from a DOM Tree
 java.lang.String resolveNamespacePrefix(java.lang.String prefix)
          Given a namespace prefix, find the namespace definition in scope in this element.
 void setAttribute(java.lang.String name, java.lang.String value)
          Adds a new attribute.
 Attr setAttributeNode(Attr newAttr)
          Adds a new attribute.
 Attr setAttributeNodeNS(Attr newAttr)
          Adds a new attribute.
 void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
          Adds a new attribute.
 boolean validateContent(DTD dtd)
          Validates the content of a element node.
 boolean validateContent(XMLSchema schema)
          Validates the content of the element against given XML Schema param schema - schema used to validate
 boolean validateContent(XMLSchema schema, java.lang.String mode)
          Validates the content of the element against given XML Schema in the given mode.
 void writeExternal(java.io.ObjectOutput outArg)
          DOM Serialization/Compression API's *** *********** The Binary syntax of the compressed stream generated by this node [element node info] {attributes }
 void writeExternal(oracle.xml.io.XMLObjectOutput out, oracle.xml.comp.CXMLContext cxmlContext)
          This method saves the state of the object by writing the object information in a binary compressed stream.
 
Methods inherited from class oracle.xml.parser.v2.XMLNSNode
addText, addText, appendChild, getChildNodes, getFirstChild, getLastChild, getNodeLocalName, getNodeName, getNodePrefix, getText, hasChildNodes, insertBefore, removeChild, replaceChild, setPrefix
 
Methods inherited from class oracle.xml.parser.v2.XMLNode
addEventListener, dispatchEvent, getColumnNumber, getDebugMode, getLineNumber, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getProperty, getSystemId, isNodeFlag, isSupported, print, print, print, readChildNodes, removeEventListener, resetNodeFlag, selectNodes, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeValue, setProperty, supports, transformNode, valueOf, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLElement

public XMLElement()
Deprecated. use createElement(String) method of XMLDocument

Default constructor. Note that this constructor is used only during deserialization/decompression of this DOM node. In order to deserialize this node to construct the DOM node from the serialized/ compressed stream, it is required to create a handle of the object. For all normal XMLElement creation use createElement(String) of XMLDocument.

XMLElement

public XMLElement(java.lang.String tag)
Deprecated. use createElement(String) method of XMLDocument

Creates an element with the given name
Parameters:
tag - Name of the element

XMLElement

public XMLElement(java.lang.String name,
                  java.lang.String prefix,
                  java.lang.String namespace)
Deprecated. use createElementNS(String, String) method of XMLDocument

Creates an element with the given name, prefix, and namespace
Parameters:
name - Local name of the element
prefix - Prefix of the element
namespace - Namespace of the element

XMLElement

public XMLElement(java.lang.String name,
                  java.lang.String prefix,
                  java.lang.String qname,
                  java.lang.String namespace)
Private constructor doesn't intern names Creates an element with the given name, prefix, and namespace
Parameters:
name - Local name of the element
prefix - Prefix of the element
qname - Qname of the element
namespace - Namespace of the element
Method Detail

getTagName

public java.lang.String getTagName()
Gets the name of the element. For example, in: <elementExample id="demo"> ... </elementExample> , tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.
Specified by:
getTagName in interface Element
Returns:
The element name

getQualifiedName

public java.lang.String getQualifiedName()
Get the qualified name for this element.
Returns:
the qualified name

getNamespace

public java.lang.String getNamespace()
Deprecated. As of DOM 2

Overrides:
getNamespace in class XMLNode
Returns:
the resolved Namespace
See Also:
Get the resolved Namespace for this element.

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.
Overrides:
getNamespaceURI in class XMLNSNode
Returns:
the namespace URI of this element
Since:
DOM 2 Gets the name space URI of this element

getLocalName

public java.lang.String getLocalName()
Gets the local Name for this element.
Overrides:
getLocalName in class XMLNSNode
Returns:
the local Name

getPrefix

public java.lang.String getPrefix()
Get the namespace prefix for this element.
Overrides:
getPrefix in class XMLNSNode
Returns:
the namespace prefix

getExpandedName

public java.lang.String getExpandedName()
Get the fully resolved name for this element.
Returns:
the fully resolved name

getNodeType

public short getNodeType()
Gets a code representing the type of the underlying object
Overrides:
getNodeType in class XMLNode
Returns:
type of the node

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Retrieves an attribute value by name.
Specified by:
getAttribute in interface Element
Parameters:
name - The name of the attribute to retrieve.
Returns:
The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws DOMException
Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string, it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute. This method is namespace unaware and hence wont result in update of namespace table if a new attr is added thru this method
Specified by:
setAttribute in interface Element
Parameters:
name - The name of the attribute to create or alter.
value - Value to set in string form.
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws DOMException
Removes an attribute by name. If the removed attribute has a default value it is immediately replaced.
Specified by:
removeAttribute in interface Element
Parameters:
name - The name of the attribute to remove.
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

getAttributeNode

public Attr getAttributeNode(java.lang.String name)
Retrieves an Attr node by name.
Specified by:
getAttributeNode in interface Element
Parameters:
name - The name of the attribute to retrieve.
Returns:
The Attr node with the specified attribute name or null if there is no such attribute.

getFirstAttribute

public XMLNode getFirstAttribute()
Retrieves the first Attr.
Returns:
The first Attr node null if there is no attribute.

getAttributeNode

public Attr getAttributeNode(java.lang.String name,
                             java.lang.String namespace)
Deprecated. As of DOM 2

See Also:
getAttributeNodeNS(String ,String)

setAttributeNode

public Attr setAttributeNode(Attr newAttr)
                      throws DOMException
Adds a new attribute. If an attribute with that name is already present in the element, it is replaced by the new one.
Specified by:
setAttributeNode in interface Element
Parameters:
newAttr - The Attr node to add to the attribute list.
Returns:
If the newAttr attribute replaces an existing attribute with the same name, the previously existing Attr node is returned, otherwise null is returned.
Throws:
DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

removeAttributeNode

public Attr removeAttributeNode(Attr oldAttr)
                         throws DOMException
Removes the specified attribute.
Specified by:
removeAttributeNode in interface Element
Parameters:
oldAttr - The Attr node to remove from the attribute list. If the removed Attr has a default value it is immediately replaced.
Returns:
The Attr node that was removed.
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.

getChildrenByTagName

public NodeList getChildrenByTagName(java.lang.String name)
Returns a NodeList of all immediate children with a given tag name,
Parameters:
name - The name of the tag to match on.
Returns:
A list of matching children

getChildrenByTagName

public NodeList getChildrenByTagName(java.lang.String name,
                                     java.lang.String ns)
Returns a NodeList of all immediate children with a given tag name and namespace
Parameters:
name - The name of the tag to match on. (should be local name)
ns - The name space
Returns:
A list of matching children

getElementsByTagName

public NodeList getElementsByTagName(java.lang.String name)
Returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree.
Specified by:
getElementsByTagName in interface Element
Parameters:
name - The name of the tag to match on. The special value "*" matches all tags.
Returns:
A list of matching Element nodes.

getElementsByTagName

public NodeList getElementsByTagName(java.lang.String name,
                                     java.lang.String ns)
Deprecated. As of DOM 2

Parameters:
name - The name of the tag to match on. The special value "*" matches all tags. (should be local name)
ns - The namespace of the elements
Returns:
A list of matching Element nodes.
See Also:
Returns a NodeList of all descendant elements with a given tag name, and namespace in the order in which they would be encountered in a preorder traversal of the Element tree.

resolveNamespacePrefix

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
Given a namespace prefix, find the namespace definition in scope in this element.
Specified by:
resolveNamespacePrefix in interface NSResolver
Parameters:
prefix - Namespace prefix to be resolved if the prefix == #default, return the default namespace
Returns:
the resolved Namespace (null, if prefix could not be resolved)

normalize

public void normalize()
Deprecated. As of DOM 2

Puts all Text nodes in the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular doc1ument tree structure are to be used.
Overrides:
normalize in class XMLNSNode
See Also:
XMLNode.normalize()

getAttributes

public NamedNodeMap getAttributes()
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
Overrides:
getAttributes in class XMLNode
Returns:
The list of attributes of this element

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.
Overrides:
cloneNode in class XMLNode
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

reportSAXEvents

public void reportSAXEvents(ContentHandler cntHandler)
                     throws SAXException
Report SAX Events from a DOM Tree
Overrides:
reportSAXEvents in class XMLNode
Parameters:
ContentHandler - cntHandler
Throws:
SAXException - thrown by SAX Callback functions

validateContent

public boolean validateContent(DTD dtd)
Validates the content of a element node.
Returns:
True if valid, else false

validateContent

public boolean validateContent(XMLSchema schema)
                        throws XMLParseException
Validates the content of the element against given XML Schema param schema - schema used to validate
Returns:
True if valid, else false

validateContent

public boolean validateContent(XMLSchema schema,
                               java.lang.String mode)
                        throws XMLParseException
Validates the content of the element against given XML Schema in the given mode.
Parameters:
schem - - schema used to validate the content
mode - - the validation mode
Returns:
True if valid, else false

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Description copied from interface: Element
Retrieves an attribute value by local name and namespace URI. HTML-only DOM implementations do not need to implement this method.
Specified by:
getAttributeNS in interface Element
Parameters:
String - namespaceURI ,String localName of the attribute to be retrieved
Returns:
the value of the attribute with the above mentioned namespace URI and localName if it exists ,else null.
Since:
DOM 2 Retrieves an attribute value by local name and namespace URI.

setAttributeNS

public void setAttributeNS(java.lang.String namespaceURI,
                           java.lang.String qualifiedName,
                           java.lang.String value)
                    throws DOMException
Description copied from interface: Element
Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNodeNS or setAttributeNode to assign it as the value of an attribute.
HTML-only DOM implementations do not need to implement this method.
Specified by:
setAttributeNS in interface Element
Parameters:
String - namespaceURI ,String localName of the attribute to be retrieved
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains illegal Characters NAMESPACE_ERR : Raised if the qualified name is malformed ,if the qualified name has a prefix and the namespace URI is null or an empty string,or if the qulaifiedName is "xmlns" and namespace URI is different from "http://www.w3.org/2000/xmlns/" ,or if qualifiedName has a prefix that is "xml" and the namespaceURI is different from http://www.w3.org/XML/1998/namespaces NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly
Since:
DOM 2 Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out.

removeAttributeNS

public void removeAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws DOMException
Description copied from interface: Element
Removes an attribute by local name and namespace URI. If the removed attribute has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix.
HTML-only DOM implementations do not need to implement this method.
Specified by:
removeAttributeNS in interface Element
Parameters:
String - namespaceURI ,String localName of the attribute to be removed
Throws:
DOMEXception - NO_MODIFICATIONS_ALLOWED_ERR : if this element is readonly
Since:
DOM 2 Removes an attribute by local name and namespace URI.

getAttributeNodeNS

public Attr getAttributeNodeNS(java.lang.String namespaceURI,
                               java.lang.String localName)
Description copied from interface: Element
Retrieves an Attr node by local name and namespace URI. HTML-only DOM implementations do not need to implement this method.
Specified by:
getAttributeNodeNS in interface Element
Parameters:
String - namespaceURI ,String localName of the attribute to be retrieved
Returns:
Attribute with the given namespaceURI and localName if it exists, else null.
Since:
DOM 2 Retrieves an Attr node by local name and namespace URI.

setAttributeNodeNS

public Attr setAttributeNodeNS(Attr newAttr)
                        throws DOMException
Description copied from interface: Element
Adds a new attribute. If an attribute with that local name and that namespace URI is already present in the element, it is replaced by the new one.
HTML-only DOM implementations do not need to implement this method.
Specified by:
setAttributeNodeNS in interface Element
Parameters:
Attribute - node to be added
Returns:
the Attribute Node added
Throws:
DOMException - WRONG_DOCUMENT_ERR : raised if the newAttr was created from a document different from the one that created the document NO_MODIFICATIONS_ALLOWED_ERR :Raised if this element is readonly INUSE_ATTRIBUTE_ERR : Raised if newAttr is already an attribute of another Element object
Since:
DOM 2 Adds a new attribute. If an attribute with that local name and that namespace URI is already present in the element, it is replaced by the new one.

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Description copied from interface: Element
Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree.
HTML-only DOM implementations do not need to implement this method.
Specified by:
getElementsByTagNameNS in interface Element
Since:
DOM 2 Returns a NodeList of all the descendant Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Element tree.

hasAttribute

public boolean hasAttribute(java.lang.String name)
Description copied from interface: Element
Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
Specified by:
hasAttribute in interface Element
Parameters:
String - name of the attribute whose presence is checked
Returns:
true if the attribute whith the specified name is present, else null
Since:
DOM 2 Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

hasAttributeNS

public boolean hasAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Description copied from interface: Element
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. HTML-only DOM implementations do not need to implement this method.
Specified by:
hasAttributeNS in interface Element
Parameters:
String - namespaceURI,String localName of the attribute whose presence is checked
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
Since:
DOM 2 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

hasAttributes

public boolean hasAttributes()
Returns whether this node (if it is an element) has any attributes.
Overrides:
hasAttributes in class XMLNode
Returns:
true if this node has any attributes, false otherwise.
Since:
DOM Level 2

writeExternal

public void writeExternal(java.io.ObjectOutput outArg)
                   throws java.io.IOException
DOM Serialization/Compression API's *** *********** The Binary syntax of the compressed stream generated by this node [element node info] {attributes }
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class XMLNode

writeExternal

public void writeExternal(oracle.xml.io.XMLObjectOutput out,
                          oracle.xml.comp.CXMLContext cxmlContext)
                   throws java.io.IOException
This method saves the state of the object by writing the object information in a binary compressed stream.
Parameters:
out - The ObjectOutput stream used to write the serialized/ comressed stream.
cxmlContext - The context of the output compressed stream
Throws:
java.io.IOException - is thrown when there is an exception while writing the compressed stream.

readExternal

public void readExternal(java.io.ObjectInput inArg)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method restores the information written by writeExternal by reading the input stream and regenerating the objects as per the information of the input stream.
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class XMLNode
Parameters:
in - is the ObjectInput stream used to read the compressed stream.
Throws:
java.io.IOException - is thrown when there is an exception reading the compressed stream.
java.lang.ClassNotFoundException - is thrown when the class is not found

readExternal

public void readExternal(oracle.xml.io.XMLObjectInput in,
                         oracle.xml.comp.CXMLContext cxmlContext)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method restores the information written by writeExternal by reading the input stream and regenerating the objects as per the information of the input stream.
Overrides:
readExternal in class XMLNode
Parameters:
in - is the XMLObjectInput stream used to read the compressed stream
Throws:
java.io.IOException - is thrown when there is an exception reading the compressed stream.
java.lang.ClassNotFoundException - is thrown when the class is not found