|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxml.XMLScanner
public class XMLScanner
This class just provides convenient packaging of a JAXP-based SAX 2 XML Parser.
The scanXML(String,DefaultHandler)
and
scanXMLText(String,DefaultHandler)
methods take an XML source
and a SAX DefaultHandler
(or sub-class instance) as
arguments, and invoke the parser on that XML source, resulting in the
delivery of a sequence of SAX events to the handler.
Field Summary | |
---|---|
static java.lang.String |
SAX_NAMESPACES
Tag for the SAX namespaces feature. |
static java.lang.String |
SAX_NS_PREFIXES
Tag for the SAX namespace-prefixes feature. |
static java.lang.String |
SAX_STRING_INTERN
Tag for the SAX string-interning feature. |
Constructor Summary | |
---|---|
XMLScanner(java.lang.String intag)
Constructs a new scanner, with the given input kind tag, and using a validating parser. |
|
XMLScanner(java.lang.String intag,
boolean validate)
Constructs a new scanner, with the given input kind tag, and using the given flag to determine whether or not to use a validating parser. |
Method Summary | |
---|---|
void |
scanXML(java.lang.String inuri,
org.xml.sax.helpers.DefaultHandler hndlr)
Applies this scanner's parser to the XML document with the given URI, using the given parse event handler. |
void |
scanXMLText(java.lang.String txt,
org.xml.sax.helpers.DefaultHandler hndlr)
Applies this scanner's parser to the given XML document text, using the given parse event 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
namespaces
feature.
public static final java.lang.String SAX_NS_PREFIXES
namespace-prefixes
feature.
public static final java.lang.String SAX_STRING_INTERN
string-interning
feature.
Constructor Detail |
---|
public XMLScanner(java.lang.String intag)
public XMLScanner(java.lang.String intag, boolean validate)
Method Detail |
---|
public void scanXML(java.lang.String inuri, org.xml.sax.helpers.DefaultHandler hndlr)
public void scanXMLText(java.lang.String txt, org.xml.sax.helpers.DefaultHandler hndlr)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |