Class Element
- java.lang.Object
-
- org.zkoss.idom.impl.AbstractItem
-
- org.zkoss.idom.impl.AbstractGroup
-
- org.zkoss.idom.Element
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.w3c.dom.Element,org.w3c.dom.Node,Attributable,Group,Item,Namespaceable
public class Element extends AbstractGroup implements Attributable, Namespaceable, org.w3c.dom.Element
The iDOM element.- Author:
- tomyeh
- See Also:
Attribute, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classElement.AttrArrayprotected classElement.AttrMap-
Nested classes/interfaces inherited from class org.zkoss.idom.impl.AbstractGroup
AbstractGroup.ChildArray, AbstractGroup.ElementMap
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,Namespace>_addNamespacesAdditional namespaces.protected java.util.List<Attribute>_attrsThe attributes.protected java.lang.String_lnameThe local name.protected Namespace_nsThe namespace.-
Fields inherited from class org.zkoss.idom.impl.AbstractGroup
_children
-
Fields inherited from interface org.zkoss.idom.Item
FIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedElement()Constructor.Element(java.lang.String lname)Constructor without a namespace (i.e.,Namespace.NO_NAMESPACE).Element(java.lang.String nsURI, java.lang.String tname)Constructor.Element(Namespace ns, java.lang.String lname)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddDeclaredNamespace(Namespace ns)Adds a namespace to the namespace declaration.java.lang.Objectclone()Clones this object (a deep cloning not including contents contained in Textual nodes).java.lang.StringgetAttribute(java.lang.String tname)intgetAttributeIndex(int indexFrom, java.lang.String tname)Gets the index of the attribute with the giving local name.intgetAttributeIndex(int indexFrom, java.lang.String namespace, java.lang.String name, int mode)Gets the index of the first attribute that matches the specified criteria.AttributegetAttributeItem(java.lang.String tname)Gets the attribute with the tag name.AttributegetAttributeItem(java.lang.String namespace, java.lang.String name, int mode)Gets the first attribute that matches the specified criteria.java.util.List<Attribute>getAttributeItems()Returns all attributes of this object.org.w3c.dom.AttrgetAttributeNode(java.lang.String tname)org.w3c.dom.AttrgetAttributeNodeNS(java.lang.String nsURI, java.lang.String lname)java.lang.StringgetAttributeNS(java.lang.String nsURI, java.lang.String lname)org.w3c.dom.NamedNodeMapgetAttributes()java.util.List<Attribute>getAttributes(java.lang.String namespace, java.lang.String name, int mode)Gets a list of attributes of the specified criteria.java.lang.StringgetAttributeValue(java.lang.String tname)Returns the value of the attribute of the specified tag name, or null if not specified.java.lang.StringgetAttributeValue(java.lang.String namespace, java.lang.String name, int mode)Gets the value of the first attribute that matches the giving criteria, or null if not found.java.lang.ObjectgetContent()Gets the content of this element.java.lang.ObjectgetContent(java.lang.String path)Returns the content of the child element with the giving path, or null if the content is null or the child element doesn't exist.java.util.Collection<Namespace>getDeclaredNamespaces()Returns namespace declared on this element.org.w3c.dom.NodeListgetElementsByTagName(java.lang.String tname)org.w3c.dom.NodeListgetElementsByTagNameNS(java.lang.String nsURI, java.lang.String lname)java.lang.StringgetLocalName()Gets the local name of this item.java.lang.StringgetName()Gets the tag name of the element -- the name with prefix.NamespacegetNamespace()Gets the namespace.NamespacegetNamespace(java.lang.String prefix)Returns the Namespace in scope on this element for the given prefix (this involves searching up the tree, so the results depend on the current location of the element), or null if not found.java.lang.StringgetNamespaceURI()shortgetNodeType()java.lang.StringgetNodeValue()Always null.java.lang.StringgetPrefix()org.w3c.dom.TypeInfogetSchemaTypeInfo()java.lang.StringgetTagName()Gets the tag name of this item.java.lang.StringgetText()Returns the concatenation ofTextualchildren; never null.java.lang.StringgetText(boolean trim)Returns the concatenation ofTextualchildren; never null.booleanhasAttribute(java.lang.String tname)booleanhasAttributeNS(java.lang.String nsURI, java.lang.String lname)booleanhasAttributes()booleanhasContent(java.lang.String path)Tests whether the child element with the giving path exists.booleanisRootElement()Tests whether this element is the root element of the owning document.protected java.util.List<Attribute>newAttrArray()Creates an empty list of attributes.voidremoveAttribute(java.lang.String tname)org.w3c.dom.AttrremoveAttributeNode(org.w3c.dom.Attr oldAttr)voidremoveAttributeNS(java.lang.String nsURI, java.lang.String lname)java.lang.ObjectremoveContent(java.lang.String path)Removes the content of the child element with the giving path, and the child element itself if no other child.voidsetAttribute(java.lang.String tname, java.lang.String value)AttributesetAttribute(Attribute attr)Adds the giving attribute.org.w3c.dom.AttrsetAttributeNode(org.w3c.dom.Attr newAttr)org.w3c.dom.AttrsetAttributeNodeNS(org.w3c.dom.Attr newAttr)voidsetAttributeNS(java.lang.String nsURI, java.lang.String tname, java.lang.String value)AttributesetAttributeValue(java.lang.String tname, java.lang.String value)Sets the value of the attribute with the giving tag name.java.lang.ObjectsetContent(java.lang.Object obj)Sets the content of this element.java.lang.ObjectsetContent(java.lang.String path, java.lang.Object obj)Sets the content of the child element with the giving path.voidsetIdAttribute(java.lang.String name, boolean isId)voidsetIdAttributeNode(org.w3c.dom.Attr idAttr, boolean isId)voidsetIdAttributeNS(java.lang.String namespaceURI, java.lang.String localName, boolean isId)voidsetLocalName(java.lang.String lname)Sets the local name of this item.voidsetName(java.lang.String tname)Sets the tag name of the element.voidsetNamespace(java.lang.String prefix, java.lang.String nsURI)Sets the namespace.voidsetNamespace(Namespace ns)Sets the namespace.voidsetPrefix(java.lang.String prefix)voidsetTagName(java.lang.String tname)Sets the tag name of this item.java.lang.StringtoString()-
Methods inherited from class org.zkoss.idom.impl.AbstractGroup
anyElement, appendChild, coalesce, detachChildren, getChildNodes, getChildren, getElement, getElement, getElementIndex, getElementIndex, getElementNames, getElements, getElements, getElements, getElementValue, getElementValue, getFirstChild, getLastChild, hasChildNodes, insertBefore, newChildren, removeChild, replaceChild
-
Methods inherited from class org.zkoss.idom.impl.AbstractItem
cloneNode, compareDocumentPosition, detach, equals, getBaseURI, getDocument, getFeature, getLocator, getNextSibling, getNodeName, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getUserData, hashCode, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, setLocator, setNodeValue, setParent, setText, setTextContent, setUserData
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.idom.Item
detach, getDocument, getLocator, getParent, setLocator, setParent, setText
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setTextContent, setUserData
-
-
-
-
Field Detail
-
_ns
protected Namespace _ns
The namespace.
-
_lname
protected java.lang.String _lname
The local name.
-
_attrs
protected java.util.List<Attribute> _attrs
The attributes. May be null.
-
_addNamespaces
protected java.util.Map<java.lang.String,Namespace> _addNamespaces
Additional namespaces. May be null
-
-
Constructor Detail
-
Element
public Element(java.lang.String nsURI, java.lang.String tname)Constructor.- Parameters:
nsURI- the namespace URItname- the tag name
-
Element
public Element(Namespace ns, java.lang.String lname)
Constructor.- Parameters:
ns- the namespace; if null, the default namespace is assumed (not necessaryNamespace.NO_NAMESPACE).lname- the local name
-
Element
public Element(java.lang.String lname)
Constructor without a namespace (i.e.,Namespace.NO_NAMESPACE).- Parameters:
lname- the local name
-
Element
protected Element()
Constructor. Unlike other constructors, it doesn't set the modification flag.
-
-
Method Detail
-
isRootElement
public final boolean isRootElement()
Tests whether this element is the root element of the owning document.Note: false is returned if it doesn't has any parent.
-
getNamespace
public final Namespace getNamespace(java.lang.String prefix)
Returns the Namespace in scope on this element for the given prefix (this involves searching up the tree, so the results depend on the current location of the element), or null if not found.If prefix is empty, it searches for the "default" namespace in scope. Thus, to search for attribute's namespace, caller have to skip this one and use NO_NAMESPACE. (due XML, an attribute without prefix is NO_NAMESPACE)
- Parameters:
prefix- namespace prefix to look up; null for empty
-
getDeclaredNamespaces
public final java.util.Collection<Namespace> getDeclaredNamespaces()
Returns namespace declared on this element.It is not a "live" representation. Also, it is read-only.
Note: Namespace.equals compares namespace's URI. However, the distinction here is the prefix, because it is mainly for getNamespace(prefix).
- Returns:
- the namespace declarations.
-
addDeclaredNamespace
public final boolean addDeclaredNamespace(Namespace ns)
Adds a namespace to the namespace declaration.- Returns:
- true if the namespace is added
- Throws:
DOMException- if the name space with the same prefix already exists but with different URI
-
getContent
public final java.lang.Object getContent()
Gets the content of this element.The content of an element is the first Binary or Text child of the element. Each element can has zero or one content.
Note:
getText()returns the concatenation of all Text children, not just the first one.- Returns:
- the content of this element; null if no such child
- See Also:
getContent(String)
-
setContent
public final java.lang.Object setContent(java.lang.Object obj)
Sets the content of this element.All existent Binary or Text children of this element are removed first. If the object is a String, a Text item is created to hold it. Otherwise, a Binary item is created to hold it.
Non-Binary/Text children are preserved.
If obj is a
Itemor an array/collection ofItem, this method will add them as child vertices rather than being the content. Moreover, if the first item of the array/collection isItem, it is assumed to be all valid component to being has valid vertices. If not, an exception is thrown.Thus, getContent might not return the object being set by setContent.
- Parameters:
obj- the object to set; null is OK- Returns:
- the previous content
- See Also:
getContent()
-
getContent
public final java.lang.Object getContent(java.lang.String path)
Returns the content of the child element with the giving path, or null if the content is null or the child element doesn't exist.Note that there might be more than one child with the same path in an iDOM tree; this method simply picks the first one that matches and returns its content. To access certain one, you might use [n] to [@attr = value] specify which one to access.
To know whether the child element exists or content is null, use
hasContent(java.lang.String).The content of an element is a special feature of iDOM. Like a Map, it is designed to let developers use names (in a path-like format) to access objects. See
setContent(String, Object).Like Unix path, the giving name could use '/' to concatenate a series of child elements.
An empty path denotes this element itself. Leading, ending and consecutive '/' will be ignored.
Example:
Object o = element.getContent("abc/def");
String s = Objects.toString(element.getContent("ab/cd"));
element.setContent("t:ab/cd/f:ef", new Integer(10));TODO: support [n] and [@attr = value]
- Parameters:
path- a path; e.g., "b", "a/b", "t:a/t:b"- See Also:
getContent()
-
hasContent
public final boolean hasContent(java.lang.String path)
Tests whether the child element with the giving path exists. Note that there might be more than one child with the same path in an iDOM tree; this method simply tell you that "yes", at least on such path exist. To get the content, usegetContent(String).
-
setContent
public final java.lang.Object setContent(java.lang.String path, java.lang.Object obj)Sets the content of the child element with the giving path.Note that there might be more than one child with the same path in an iDOM tree; this method simply pick one that matches and set its content (see
setContent(Object)).The content of an element is a special feature of iDOM. Like a Map, it is designed to let developers use names (in a path-like format) to access objects. See
getContent(String).Like Unix path, the giving name could use '/' to concatenate a series of child elements.
An empty path denotes this element itself. Leading, ending and consecutive '/' will be ignored.
If any element in the path is not found, it will be created automatically.
- Parameters:
path- a path; e.g., "b", "a/b", "t:a/t:b"obj- the object to set; null is acceptable- Returns:
- the previous content
- See Also:
setContent(Object),removeContent(java.lang.String),hasContent(java.lang.String)
-
removeContent
public final java.lang.Object removeContent(java.lang.String path)
Removes the content of the child element with the giving path, and the child element itself if no other child.Unlike
setContent(String, Object)with null, the child element identified by path will be detached if it has no other child (but the content). So does its parent excluding this element. Thus, removeContent(path) could undo setContent(path, v).- Returns:
- the previous content
- See Also:
setContent(String, Object)
-
setNamespace
public final void setNamespace(Namespace ns)
Sets the namespace. If ns is null, the default namespace is assumed (not necessaryNamespace.NO_NAMESPACE.According W3C/DOM, unlike element, an attribute doesn't allow a namespace that has an URI but without a prefix.
- Specified by:
setNamespacein interfaceNamespaceable
-
setNamespace
public final void setNamespace(java.lang.String prefix, java.lang.String nsURI)Sets the namespace.
-
getNamespace
public final Namespace getNamespace()
Description copied from interface:NamespaceableGets the namespace.- Specified by:
getNamespacein interfaceNamespaceable- Returns:
- the namespace; never null
-
getTagName
public final java.lang.String getTagName()
Description copied from interface:NamespaceableGets the tag name of this item. The tag name is also called the fully qualified name -- the name with the namespace prefix, e.g., prefix:name.To get the local name (the name without prefix), Namespaceable.getLocalName could be used.
- Specified by:
getTagNamein interfaceorg.w3c.dom.Element- Specified by:
getTagNamein interfaceNamespaceable
-
setTagName
public final void setTagName(java.lang.String tname)
Description copied from interface:NamespaceableSets the tag name of this item.- Specified by:
setTagNamein interfaceNamespaceable
-
getLocalName
public final java.lang.String getLocalName()
Description copied from interface:NamespaceableGets the local name of this item. The local name is the name without prefix.To get the tag name (the name with prefix), Namespaceable.getTagName could be used.
- Specified by:
getLocalNamein interfaceNamespaceable- Specified by:
getLocalNamein interfaceorg.w3c.dom.Node- Overrides:
getLocalNamein classAbstractItem
-
setLocalName
public final void setLocalName(java.lang.String lname)
Description copied from interface:NamespaceableSets the local name of this item.- Specified by:
setLocalNamein interfaceNamespaceable
-
getName
public final java.lang.String getName()
Gets the tag name of the element -- the name with prefix. To get the local name, use getLocalName.- Specified by:
getNamein interfaceItem- See Also:
Namespaceable.getTagName()
-
setName
public final void setName(java.lang.String tname)
Sets the tag name of the element. It will affect the local name and the namespace's prefix.- Specified by:
setNamein interfaceItem- Overrides:
setNamein classAbstractItem- See Also:
Namespaceable.setTagName(java.lang.String)
-
getText
public final java.lang.String getText()
Returns the concatenation ofTextualchildren; never null. Note: both <tag/> and <tag></tag> returns an empty string. To tell the difference, check the number of children.- Specified by:
getTextin interfaceItem- Overrides:
getTextin classAbstractItem- See Also:
getText(boolean)
-
getText
public final java.lang.String getText(boolean trim)
Returns the concatenation ofTextualchildren; never null.- Parameters:
trim- whether to trim before returning- See Also:
getText()
-
getAttributeItems
public final java.util.List<Attribute> getAttributeItems()
Description copied from interface:AttributableReturns all attributes of this object.The returned list is "live". Any modification to it affects the object that owns the attributes.
If the new added attribute has the same tag name as that of any existent attribute, DOMException is thrown. Thus, it is, sometimes, more convenient to ue setAttribute.
Naming reason: we don't call it getAttributes() to avoid the name conflict with Node.getAttributes().
- Specified by:
getAttributeItemsin interfaceAttributable- Returns:
- an empty list if no attribute at all
-
newAttrArray
protected java.util.List<Attribute> newAttrArray()
Creates an empty list of attributes.
-
getAttributeIndex
public final int getAttributeIndex(int indexFrom, java.lang.String namespace, java.lang.String name, int mode)Description copied from interface:AttributableGets the index of the first attribute that matches the specified criteria.- Specified by:
getAttributeIndexin interfaceAttributable- Parameters:
indexFrom- the index to start searching from; 0 for beginningnamespace- the namespace URI if FIND_BY_PREFIX is not specified; the namespace prefix if FIND_BY_PREFIX specified; null to ignorename- the local name if FIND_BY_TAGNAME is not specified; the tag name if FIND_BY_TAGNAME specified; null to ignoremode- the search mode; zero or any combination of Item.FIND_xxx- Returns:
- the index if found; -1 if not found
-
getAttributeIndex
public final int getAttributeIndex(int indexFrom, java.lang.String tname)Description copied from interface:AttributableGets the index of the attribute with the giving local name.- Specified by:
getAttributeIndexin interfaceAttributable- Parameters:
indexFrom- the index to start searching from; 0 for beginningtname- the tag name (i.e.,Attribute.getName()) -- consists of the prefix and the local name- Returns:
- the index if found; -1 if not found
-
getAttributeItem
public final Attribute getAttributeItem(java.lang.String namespace, java.lang.String name, int mode)
Description copied from interface:AttributableGets the first attribute that matches the specified criteria.The name is a bit strange because we have to avoid name conflicts with org.w3c.dom.Node.
- Specified by:
getAttributeItemin interfaceAttributable- Parameters:
namespace- the namespace URI if FIND_BY_PREFIX is not specified; the namespace prefix if FIND_BY_PREFIX specified; null to ignorename- the local name if FIND_BY_TAGNAME is not specified; the tag name if FIND_BY_TAGNAME specified; null to ignoremode- the search mode; zero or any combination of Item.FIND_xxx- Returns:
- the index if found; -1 if not found
-
getAttributeItem
public final Attribute getAttributeItem(java.lang.String tname)
Description copied from interface:AttributableGets the attribute with the tag name.The name is a bit strange because we have to avoid name conflicts with org.w3c.dom.Node.
- Specified by:
getAttributeItemin interfaceAttributable- Parameters:
tname- the tag name (i.e.,Attribute.getName()) -- consists of the prefix and the local name- Returns:
- null if not found
-
getAttributes
public final java.util.List<Attribute> getAttributes(java.lang.String namespace, java.lang.String name, int mode)
Description copied from interface:AttributableGets a list of attributes of the specified criteria.- Specified by:
getAttributesin interfaceAttributable- Parameters:
namespace- the namespace URI if FIND_BY_PREFIX is not specified; the namespace prefix if FIND_BY_PREFIX specified; null to ignorename- the local name if FIND_BY_TAGNAME is not specified; the tag name if FIND_BY_TAGNAME specified; null to ignoremode- the search mode; zero or any combination of Item.FIND_xxx- Returns:
- null if not found
-
setAttribute
public final Attribute setAttribute(Attribute attr)
Description copied from interface:AttributableAdds the giving attribute. If there is any existent one with the same tag name, it will be replaced. If not, the new attribute will be appended.- Specified by:
setAttributein interfaceAttributable- Parameters:
attr- the new attribute to add- Returns:
- the attribute being replaced; null if no one is replaced
-
getAttributeValue
public final java.lang.String getAttributeValue(java.lang.String namespace, java.lang.String name, int mode)Description copied from interface:AttributableGets the value of the first attribute that matches the giving criteria, or null if not found.According to Section 3.3.3 of XML 1.0 spec, the value is normalized, including trimmed.
- Specified by:
getAttributeValuein interfaceAttributable- Parameters:
namespace- the namespace URI if FIND_BY_PREFIX is not specified; the namespace prefix if FIND_BY_PREFIX specified; null to ignorename- the local name if FIND_BY_TAGNAME is not specified; the tag name if FIND_BY_TAGNAME specified; null to ignore- Returns:
- the value of the attribute; null if not found
-
getAttributeValue
public final java.lang.String getAttributeValue(java.lang.String tname)
Description copied from interface:AttributableReturns the value of the attribute of the specified tag name, or null if not specified.Note: unlike W3C's getAttribute, which returns empty if not specified, this method returns null if not specified.
- Specified by:
getAttributeValuein interfaceAttributable
-
setAttributeValue
public final Attribute setAttributeValue(java.lang.String tname, java.lang.String value)
Description copied from interface:AttributableSets the value of the attribute with the giving tag name. If the attribute doesn't exist, a new attribute will be created and added.Note: it looks similar to Attribute(String, String), but this method requires the tag name.
- Specified by:
setAttributeValuein interfaceAttributable- Parameters:
tname- the tag name (i.e., Attribute.getName)value- the new value.- Returns:
- the attribute being replaced; null if no one is replaced
-
clone
public java.lang.Object clone()
Description copied from class:AbstractItemClones this object (a deep cloning not including contents contained in Textual nodes). Note: after cloning, the read-only flag always becomes false, and the parent becomes null (i.e., detached).- Specified by:
clonein interfaceItem- Overrides:
clonein classAbstractGroup
-
getNodeType
public final short getNodeType()
- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node
-
getNodeValue
public final java.lang.String getNodeValue()
Always null. Unlike other nodes, it is not the same as getText.- Specified by:
getNodeValuein interfaceorg.w3c.dom.Node- Overrides:
getNodeValuein classAbstractItem
-
getAttributes
public final org.w3c.dom.NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceorg.w3c.dom.Node- Overrides:
getAttributesin classAbstractItem
-
hasAttributes
public final boolean hasAttributes()
- Specified by:
hasAttributesin interfaceorg.w3c.dom.Node- Overrides:
hasAttributesin classAbstractItem
-
getNamespaceURI
public final java.lang.String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceorg.w3c.dom.Node- Overrides:
getNamespaceURIin classAbstractItem
-
getPrefix
public final java.lang.String getPrefix()
- Specified by:
getPrefixin interfaceorg.w3c.dom.Node- Overrides:
getPrefixin classAbstractItem
-
setPrefix
public final void setPrefix(java.lang.String prefix)
- Specified by:
setPrefixin interfaceorg.w3c.dom.Node- Overrides:
setPrefixin classAbstractItem
-
getElementsByTagName
public final org.w3c.dom.NodeList getElementsByTagName(java.lang.String tname)
- Specified by:
getElementsByTagNamein interfaceorg.w3c.dom.Element
-
getElementsByTagNameNS
public final org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String nsURI, java.lang.String lname)- Specified by:
getElementsByTagNameNSin interfaceorg.w3c.dom.Element
-
getAttributeNode
public final org.w3c.dom.Attr getAttributeNode(java.lang.String tname)
- Specified by:
getAttributeNodein interfaceorg.w3c.dom.Element
-
getAttributeNodeNS
public final org.w3c.dom.Attr getAttributeNodeNS(java.lang.String nsURI, java.lang.String lname)- Specified by:
getAttributeNodeNSin interfaceorg.w3c.dom.Element
-
getAttribute
public final java.lang.String getAttribute(java.lang.String tname)
- Specified by:
getAttributein interfaceorg.w3c.dom.Element
-
getAttributeNS
public final java.lang.String getAttributeNS(java.lang.String nsURI, java.lang.String lname)- Specified by:
getAttributeNSin interfaceorg.w3c.dom.Element
-
setAttribute
public final void setAttribute(java.lang.String tname, java.lang.String value)- Specified by:
setAttributein interfaceorg.w3c.dom.Element
-
setAttributeNS
public final void setAttributeNS(java.lang.String nsURI, java.lang.String tname, java.lang.String value)- Specified by:
setAttributeNSin interfaceorg.w3c.dom.Element
-
setAttributeNode
public final org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
- Specified by:
setAttributeNodein interfaceorg.w3c.dom.Element
-
setAttributeNodeNS
public final org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
- Specified by:
setAttributeNodeNSin interfaceorg.w3c.dom.Element
-
removeAttribute
public final void removeAttribute(java.lang.String tname)
- Specified by:
removeAttributein interfaceorg.w3c.dom.Element
-
removeAttributeNS
public final void removeAttributeNS(java.lang.String nsURI, java.lang.String lname)- Specified by:
removeAttributeNSin interfaceorg.w3c.dom.Element
-
removeAttributeNode
public final org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
- Specified by:
removeAttributeNodein interfaceorg.w3c.dom.Element
-
hasAttribute
public final boolean hasAttribute(java.lang.String tname)
- Specified by:
hasAttributein interfaceorg.w3c.dom.Element
-
hasAttributeNS
public final boolean hasAttributeNS(java.lang.String nsURI, java.lang.String lname)- Specified by:
hasAttributeNSin interfaceorg.w3c.dom.Element
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSchemaTypeInfo
public org.w3c.dom.TypeInfo getSchemaTypeInfo()
- Specified by:
getSchemaTypeInfoin interfaceorg.w3c.dom.Element
-
setIdAttribute
public void setIdAttribute(java.lang.String name, boolean isId) throws DOMException- Specified by:
setIdAttributein interfaceorg.w3c.dom.Element- Throws:
DOMException
-
setIdAttributeNS
public void setIdAttributeNS(java.lang.String namespaceURI, java.lang.String localName, boolean isId) throws DOMException- Specified by:
setIdAttributeNSin interfaceorg.w3c.dom.Element- Throws:
DOMException
-
setIdAttributeNode
public void setIdAttributeNode(org.w3c.dom.Attr idAttr, boolean isId) throws DOMException- Specified by:
setIdAttributeNodein interfaceorg.w3c.dom.Element- Throws:
DOMException
-
-