|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcasxml.XMLScanner
public class XMLScanner
An XMLScanner
provides a convenient packaging of a
JAXP-based SAX 2 XML Parser.
Each of the methods scanXML(InputSource,DefaultHandler)
and
scanXMLText(String,DefaultHandler)
takes some form of XML source and a DefaultHandler
(or sub-class) instance as arguments, and
invokes the parser on that XML source -- resulting in the
delivery of a sequence of SAX events to the handler.
Nested Class Summary | |
---|---|
class |
XMLScanner.ScanException
All-purpose scanner exception class. |
Field Summary | |
---|---|
static java.lang.String |
SAX_NAMESPACES
SAX namespaces feature name. |
static java.lang.String |
SAX_NS_PREFIXES
SAX namespace prefixes feature name. |
static java.lang.String |
SAX_STRING_INTERN
SAX string interning feature name. |
Constructor Summary | |
---|---|
XMLScanner(java.lang.String intag)
Constructs a new validating scanner with the given idenfification tag. |
|
XMLScanner(java.lang.String intag,
boolean validate)
Constructs a new scanner with the given idenfification tag, performing XML validataion or not, as specified. |
Method Summary | |
---|---|
static java.lang.String |
getSPXLineColText(org.xml.sax.SAXParseException spx)
Returns line and column number text for the given SAX parse exception. |
static java.lang.String |
getSPXLocationText(org.xml.sax.SAXParseException spx)
Returns a full location text, including System Id if available, for the given SAX parse exception. |
void |
scanXML(org.xml.sax.InputSource insrc,
org.xml.sax.helpers.DefaultHandler hndlr)
Parses the given source XML document, feeding SAX parse events to the given handler. |
void |
scanXMLText(java.lang.String txt,
org.xml.sax.helpers.DefaultHandler hndlr)
Parses the given XML document text, feeding SAX parse events to the given handler. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SAX_NAMESPACES
public static final java.lang.String SAX_NS_PREFIXES
public static final java.lang.String SAX_STRING_INTERN
Constructor Detail |
---|
public XMLScanner(java.lang.String intag) throws XMLScanner.ScanException
XMLScanner.ScanException
public XMLScanner(java.lang.String intag, boolean validate) throws XMLScanner.ScanException
XMLScanner.ScanException
Method Detail |
---|
public void scanXML(org.xml.sax.InputSource insrc, org.xml.sax.helpers.DefaultHandler hndlr) throws XMLScanner.ScanException
XMLScanner.ScanException
public void scanXMLText(java.lang.String txt, org.xml.sax.helpers.DefaultHandler hndlr) throws XMLScanner.ScanException
XMLScanner.ScanException
public static java.lang.String getSPXLocationText(org.xml.sax.SAXParseException spx)
public static java.lang.String getSPXLineColText(org.xml.sax.SAXParseException spx)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |