Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## superwaba.ext.xplat.util.xml
Class XmlListener

    java.lang.Object
      |
      +--superwaba.ext.xplat.util.xml.XmlListener

Direct Known Subclasses:
  HttpXmlListener

public abstract class XmlListener
extends Object

Listener that must be extended to process the events thrown by XmlLiteParser. See also superwaba/examples/util/xml for an example.

Field Summary
`byte[]` | `buffer` Buffer that stores the contents for the current tag/attribute.
`int` | `len` Current length of the string
`int` | `start` Starting position of the current string in the buffer

Constructor Summary
`XmlListener()`

Method Summary
`abstract void` | `foundAttributeName()` This is the default method called by parser when an attribute name is found.
`abstract void` | `foundAttributeValue()` This is the default method called by parser when an attribute value is found.
`abstract void` | `foundContent()` This is the default method called by parser when a content text is found.
`abstract void` | `foundEndTagName()` This is the default method called by parser when an end tag name is found.
`abstract void` | `foundStartTagName()` This is the default method called by parser when a start tag name is found.
`String` | `getString()` Returns the current string being represented in this moment.
`int` | `hashCode()` Returns the hashcode for the string in the current tag.

Methods inherited from class java.lang.Object
`equals, getClass, notify, toString, wait, wait`

Field Detail

### buffer

    public byte[] buffer

  Buffer that stores the contents for the current tag/attribute. Every time a method is called, the contents of this buffer from 0 to the given len stores the current attribute/tag.

### len

    public int len

  Current length of the string

### start

    public int start

  Starting position of the current string in the buffer

Constructor Detail

### XmlListener

    public XmlListener()

Method Detail

### foundStartTagName

    public abstract void foundStartTagName()

  This is the default method called by parser when a start tag name is found.

### foundAttributeName

    public abstract void foundAttributeName()

  This is the default method called by parser when an attribute name is found.

### foundEndTagName

    public abstract void foundEndTagName()

  This is the default method called by parser when an end tag name is found.

### foundAttributeValue

    public abstract void foundAttributeValue()

  This is the default method called by parser when an attribute value is found.

### foundContent

    public abstract void foundContent()

  This is the default method called by parser when a content text is found.

### getString

    public String getString()

  Returns the current string being represented in this moment. If you want just to check if the current string is equal to a desired one, please use the `hashCode` method instead.

### hashCode

    public int hashCode()

  Returns the hashcode for the string in the current tag. Efficient to check if this is the tag you want without allocating a String and doing an `equals`. Note that jdk 1.1.x has a different method for computing the hashcode, comparing with the other jdks (and i can't guarantee they won't change it in the future!). This method uses the same one of SuperWaba VM: jdk 1.2.2.
  Overrides:
    hashCode in class Object

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD