|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.xml.parser.Parser
This class implements an eXtensible Markup Language (XML) parser according to the latest World Wide Web Consortium (W3C) working draft of the XML specification. This parser class is used internally by the XML document load method, so you shouldn't need to use it directly.
Constructor Summary | |
Parser()
Creates a new parser object. |
Method Summary | |
XMLOutputStream |
createOutputStream(OutputStream out)
Creates an output stream that best matches the XML data format found during parsing. |
void |
loadDTD(String urlStr,
Atom nameSpace)
|
void |
parse(InputStream in,
ElementFactory factory,
DTD dtd,
Element root,
boolean caseInsensitive,
boolean loadExt)
Parses the XML from given input stream. |
void |
parse(URL url,
ElementFactory factory,
DTD dtd,
Element root,
boolean caseInsensitive,
boolean loadExt)
Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy. |
void |
report(ParseException e,
OutputStream out)
Reports errors to the specified output stream including parsing context and stack trace where the error occurred. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Parser()
Method Detail |
public final void parse(URL url, ElementFactory factory, DTD dtd, Element root, boolean caseInsensitive, boolean loadExt) throws ParseException
url
- the url points to the XML document to parse.factory
- used to create XML Elements during parsing.dtd
- the object that the parser stores DTD information in.root
- the root node to start with and add children to
during parsing.loadext
- whether to load external DTD's and/or entitiespublic final void parse(InputStream in, ElementFactory factory, DTD dtd, Element root, boolean caseInsensitive, boolean loadExt) throws ParseException
in
- the input stream containing XML data to parse.factory
- used to create XML Elements during parsing.dtd
- the object that the parser stores DTD information in.root
- the root node to start with and add children to
during parsing.public final void report(ParseException e, OutputStream out)
e
- The exception to report.out
- The output stream to write the report to.public final XMLOutputStream createOutputStream(OutputStream out)
out
- The output stream.XMLOutputStream
object that uses the newline
separator
defined by the system property "line.separator".public final void loadDTD(String urlStr, Atom nameSpace) throws ParseException
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |