Package org.gjt.xpp

Interface XmlTag

All Known Subinterfaces:
XmlEndTag, XmlNode, XmlPullNode, XmlStartTag
All Known Implementing Classes:
EndTag, Node, PullNode, StartTag, Tag

public interface XmlTag
Base interface that encapsulates common functionality for XML elements: both start tag and end tag (an empty element is equivalent to start tag followed by end tag so for simplicity ti is not modeled as a separate class).
Author:
Aleksander Slominski
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the local name of the current element
    Returns the namespace URI of the current element Returns null if not applicable
    Returns the prefix of the current element or null if elemet has no prefix.
    Returns the raw name (prefix + ':' + localName) of the current element
    void
    modifyTag(String namespaceURI, String localName, String rawName)
    Modify tag to have namespace URI, localName and rawName.
    void
    Clear all Tag state to default values.
  • Method Details

    • resetTag

      void resetTag()
      Clear all Tag state to default values.
    • getNamespaceUri

      String getNamespaceUri()
      Returns the namespace URI of the current element Returns null if not applicable
    • getLocalName

      String getLocalName()
      Returns the local name of the current element
    • getPrefix

      String getPrefix()
      Returns the prefix of the current element or null if elemet has no prefix.
    • getRawName

      String getRawName()
      Returns the raw name (prefix + ':' + localName) of the current element
    • modifyTag

      void modifyTag(String namespaceURI, String localName, String rawName) throws XmlPullParserException
      Modify tag to have namespace URI, localName and rawName.

      NOTE: setting modeled after SAX2 startTag

      Parameters:
      namespaceURI - maybe null then default "" namespace is used
      localName - may be null then rawName is used
      rawName - actual attribute name MUST be not null if it is null exception MUST be thrown
      Throws:
      XmlPullParserException