Class 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
    • 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 attribute
        value - Value of the attribute
    • Method Detail

      • getNodeType

        public short getNodeType()
        Specified by:
        getNodeType in interface org.w3c.dom.Node
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.w3c.dom.Attr
      • getSpecified

        public boolean getSpecified()
        Specified by:
        getSpecified in interface org.w3c.dom.Attr
      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface org.w3c.dom.Attr
      • setValue

        public void setValue​(java.lang.String value)
                      throws org.w3c.dom.DOMException
        Specified by:
        setValue in interface org.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 interface org.w3c.dom.Node
        Overrides:
        setNodeValue in class XMLNode
        Throws:
        org.w3c.dom.DOMException
      • getOwnerElement

        public org.w3c.dom.Element getOwnerElement()
        Specified by:
        getOwnerElement in interface org.w3c.dom.Attr
      • getSchemaTypeInfo

        public org.w3c.dom.TypeInfo getSchemaTypeInfo()
        Specified by:
        getSchemaTypeInfo in interface org.w3c.dom.Attr
      • isId

        public boolean isId()
        Specified by:
        isId in interface org.w3c.dom.Attr
      • setId

        public void setId​(boolean isId)
      • getTextContent

        public java.lang.String getTextContent()
                                        throws org.w3c.dom.DOMException
        Specified by:
        getTextContent in interface org.w3c.dom.Node
        Throws:
        org.w3c.dom.DOMException