de.lessvoid.xml.xpp3
Class XmlParser

java.lang.Object
  extended by de.lessvoid.xml.xpp3.XmlParser

public class XmlParser
extends Object

XmlParser is a helper/wrapper around XPP3.

Author:
void

Constructor Summary
XmlParser(org.xmlpull.v1.XmlPullParser xppParam)
          Create a new XmlParser using the given XmlPullParser.
 
Method Summary
 void nextTag()
          next start or end tag.
 void oneOrMore(String tag, XmlProcessor xmlElement)
          One or more element.
 void optional(String tag, XmlProcessor xmlElement)
          Optional element.
 void read(InputStream inputStream)
          Load xml.
 void required(String tag, XmlProcessor xmlElement)
          Required element.
 void zeroOrMore(String tag, XmlProcessor xmlElement)
          Zero or more element.
 void zeroOrMore(SubstitutionGroup substGroup)
          SubstitionGroup Support.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParser

public XmlParser(org.xmlpull.v1.XmlPullParser xppParam)
Create a new XmlParser using the given XmlPullParser.

Parameters:
xppParam - the XmlPullParser to use
Method Detail

read

public void read(InputStream inputStream)
          throws Exception
Load xml.

Parameters:
inputStream - InputStream to read from
Throws:
Exception - exception

required

public void required(String tag,
                     XmlProcessor xmlElement)
              throws Exception
Required element.

Parameters:
tag - required tag
xmlElement - handler
Throws:
Exception - exception

optional

public void optional(String tag,
                     XmlProcessor xmlElement)
              throws Exception
Optional element.

Parameters:
tag - required tag
xmlElement - handler
Throws:
Exception - exception

zeroOrMore

public void zeroOrMore(String tag,
                       XmlProcessor xmlElement)
                throws Exception
Zero or more element.

Parameters:
tag - element tag
xmlElement - handler
Throws:
Exception - exception

zeroOrMore

public void zeroOrMore(SubstitutionGroup substGroup)
                throws Exception
SubstitionGroup Support.

Parameters:
substGroup - SubstitutionGroup
Throws:
Exception - exception

oneOrMore

public void oneOrMore(String tag,
                      XmlProcessor xmlElement)
               throws Exception
One or more element.

Parameters:
tag - element tag
xmlElement - handler
Throws:
Exception - exception

nextTag

public void nextTag()
             throws Exception
next start or end tag.

Throws:
Exception - exception


Copyright © 2011. All Rights Reserved.