public class XmlParser
extends java.lang.Object
This is a lightweight wrapper around the org.xml.sax framework. It simplifies
some of the method calls, takes care of setup, and handles and logs
exceptions.
NOTE This class has been ported to the Partner Platform v5 API and will soon be deprecated.
Copyright 2006 Partner Software, Inc.
| Constructor and Description |
|---|
XmlParser(java.io.Reader input,
XmlActor actor)
Create a new XMLParser with the given input and actor.
|
XmlParser(java.lang.String context,
java.io.Reader input,
XmlActor actor)
Create a new XMLParser with the given context (generally a file path), input and actor.
|
XmlParser(VfsFile file,
XmlActor actor)
Create a new XMLParser with the given VfsFile and actor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFeature(java.lang.String name,
boolean value) |
void |
addProperty(java.lang.String name,
java.lang.String value) |
Naming<java.lang.String> |
getFeatures() |
boolean |
getSucceeded()
Returns true if the last parse() was successful, and false otherwise (e.g.
|
boolean |
isValidating() |
boolean |
isValidatingAgainstSchema() |
boolean |
parse()
Parse through the XML file.
|
void |
setFeatures(Naming<java.lang.String> features) |
void |
setValidating(boolean validating) |
void |
setValidatingAgainstSchema(boolean validatingAgainstSchema) |
public XmlParser(java.lang.String context,
java.io.Reader input,
XmlActor actor)
public XmlParser(java.io.Reader input,
XmlActor actor)
public boolean parse()
throws java.io.IOException
java.io.IOExceptionpublic void addProperty(java.lang.String name,
java.lang.String value)
public void addFeature(java.lang.String name,
boolean value)
public boolean isValidating()
public void setValidating(boolean validating)
public boolean isValidatingAgainstSchema()
public void setValidatingAgainstSchema(boolean validatingAgainstSchema)
public Naming<java.lang.String> getFeatures()
public void setFeatures(Naming<java.lang.String> features)
public boolean getSucceeded()