org.demac.impl.j2me.process.base.service.webservices.xml.soap.ksoap.kxml.parser
Class XmlParser

java.lang.Object
  extended by org.demac.impl.j2me.process.base.service.webservices.xml.soap.ksoap.kxml.parser.AbstractXmlParser
      extended by org.demac.impl.j2me.process.base.service.webservices.xml.soap.ksoap.kxml.parser.XmlParser

public class XmlParser
extends AbstractXmlParser

A simple, pull based "Common XML" parser. Attention: This class has been renamed from DefaultParser for consitency with the org.kxml.io package.


Constructor Summary
XmlParser(java.io.Reader reader)
           
XmlParser(java.io.Reader reader, int bufSize)
           
 
Method Summary
 int getColumnNumber()
           
 int getLineNumber()
          Returns the current line number; -1 if unknown.
 ParseEvent peek()
          reads the next event available from the parser without consuming it
 ParseEvent read()
          reads the next event available from the parser.
 java.lang.String readName()
           
 java.lang.StringBuffer readTo(char stopChar, java.lang.StringBuffer buf)
          Reads chars to the given buffer until the given stopChar is reached.
 java.lang.String resolveCharacterEntity(java.lang.String name)
           
 void setRelaxed(boolean relaxed)
          default is false.
 
Methods inherited from class org.demac.impl.j2me.process.base.service.webservices.xml.soap.ksoap.kxml.parser.AbstractXmlParser
ignoreTree, peek, read, readText, readTree, setProcessNamespaces, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParser

public XmlParser(java.io.Reader reader)
          throws java.io.IOException
Throws:
java.io.IOException

XmlParser

public XmlParser(java.io.Reader reader,
                 int bufSize)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

readName

public java.lang.String readName()
                          throws java.io.IOException
Throws:
java.io.IOException

readTo

public java.lang.StringBuffer readTo(char stopChar,
                                     java.lang.StringBuffer buf)
                              throws java.io.IOException
Reads chars to the given buffer until the given stopChar is reached. The stopChar itself is not consumed.

Throws:
java.io.IOException

resolveCharacterEntity

public java.lang.String resolveCharacterEntity(java.lang.String name)
                                        throws java.io.IOException
Throws:
java.io.IOException

read

public ParseEvent read()
                throws java.io.IOException
Description copied from class: AbstractXmlParser
reads the next event available from the parser. If the end of the parsed stream has been reached, null is returned.

Specified by:
read in class AbstractXmlParser
Throws:
java.io.IOException

peek

public ParseEvent peek()
                throws java.io.IOException
Description copied from class: AbstractXmlParser
reads the next event available from the parser without consuming it

Specified by:
peek in class AbstractXmlParser
Throws:
java.io.IOException

setRelaxed

public void setRelaxed(boolean relaxed)
default is false. Setting relaxed true allows CHTML parsing


getLineNumber

public int getLineNumber()
Description copied from class: AbstractXmlParser
Returns the current line number; -1 if unknown. Convenience method for peek ().getLineNumber ().

Overrides:
getLineNumber in class AbstractXmlParser

getColumnNumber

public int getColumnNumber()