Package com.jsevy.jxml
Class XMLAttribute
- java.lang.Object
-
- com.jsevy.jxml.XMLNode
-
- com.jsevy.jxml.XMLAttribute
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.w3c.dom.Attr
,org.w3c.dom.Node
public class XMLAttribute extends XMLNode implements org.w3c.dom.Attr
Class representing an XML attribute associated with an XML node.- Author:
- jsevy
-
-
Field Summary
-
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 Constructor Description XMLAttribute(java.lang.String name)
Create a new attribute with the specified name.XMLAttribute(java.lang.String name, java.lang.String value)
Create a new attribute with the specified name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
short
getNodeType()
org.w3c.dom.Element
getOwnerElement()
org.w3c.dom.TypeInfo
getSchemaTypeInfo()
boolean
getSpecified()
java.lang.String
getTextContent()
java.lang.String
getValue()
boolean
isId()
void
setId(boolean isId)
void
setNodeValue(java.lang.String value)
void
setValue(java.lang.String value)
-
Methods inherited from class com.jsevy.jxml.XMLNode
appendChild, clone, cloneNode, compareDocumentPosition, equals, getAttributes, getBaseURI, getChildNodes, getDescendants, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, insertAfter, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prependChild, removeChild, replaceChild, setNamespaceURI, setNodeName, setOwnerDocument, setParentNode, setPrefix, setTextContent, setUserData
-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
-
-
-
-
Constructor Detail
-
XMLAttribute
public XMLAttribute(java.lang.String name)
Create a new attribute with the specified name.- Parameters:
name
- Name for the attribute
-
XMLAttribute
public XMLAttribute(java.lang.String name, java.lang.String value)
Create a new attribute with the specified name and value.- Parameters:
name
- Name for the attributevalue
- Value of the attribute
-
-
Method Detail
-
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interfaceorg.w3c.dom.Node
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.w3c.dom.Attr
-
getSpecified
public boolean getSpecified()
- Specified by:
getSpecified
in interfaceorg.w3c.dom.Attr
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfaceorg.w3c.dom.Attr
-
setValue
public void setValue(java.lang.String value) throws org.w3c.dom.DOMException
- Specified by:
setValue
in interfaceorg.w3c.dom.Attr
- Throws:
org.w3c.dom.DOMException
-
setNodeValue
public void setNodeValue(java.lang.String value) throws org.w3c.dom.DOMException
- Specified by:
setNodeValue
in interfaceorg.w3c.dom.Node
- Overrides:
setNodeValue
in classXMLNode
- Throws:
org.w3c.dom.DOMException
-
getOwnerElement
public org.w3c.dom.Element getOwnerElement()
- Specified by:
getOwnerElement
in interfaceorg.w3c.dom.Attr
-
getSchemaTypeInfo
public org.w3c.dom.TypeInfo getSchemaTypeInfo()
- Specified by:
getSchemaTypeInfo
in interfaceorg.w3c.dom.Attr
-
isId
public boolean isId()
- Specified by:
isId
in interfaceorg.w3c.dom.Attr
-
setId
public void setId(boolean isId)
-
getTextContent
public java.lang.String getTextContent() throws org.w3c.dom.DOMException
- Specified by:
getTextContent
in interfaceorg.w3c.dom.Node
- Throws:
org.w3c.dom.DOMException
-
-