com.cometway.xml
Class XMLToken

java.lang.Object
  extended by com.cometway.xml.XMLToken

public class XMLToken
extends java.lang.Object

This class represents a XML element returned by the nextElement() method in the XMLParser.

See Also:
XML, XMLParser

Field Summary
 java.lang.String data
          This is the parsed out data
 int type
          This is the type of Element
 
Constructor Summary
XMLToken()
           
XMLToken(int type, java.lang.String data)
          This constructor allows for the XML token's type to be specified.
 
Method Summary
 Props getProps()
          This returns a Props containing the attributes if this is a START_TAG or EMPTY_ELEMENT_TAG.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public int type
This is the type of Element


data

public java.lang.String data
This is the parsed out data

Constructor Detail

XMLToken

public XMLToken()

XMLToken

public XMLToken(int type,
                java.lang.String data)
This constructor allows for the XML token's type to be specified.

Method Detail

getProps

public Props getProps()
               throws XMLParserException
This returns a Props containing the attributes if this is a START_TAG or EMPTY_ELEMENT_TAG. The tag name itself is also stored in a property named
tag_name
. It throws an XMLParserException otherwise.

Throws:
XMLParserException

main

public static void main(java.lang.String[] args)