|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.utils.XMLTools
public class XMLTools
Utility class for reading chunks of XML files and feeding them to SAX.
| Method Summary | |
|---|---|
static boolean |
readXMLChunk(java.io.BufferedReader reader,
org.xml.sax.helpers.DefaultHandler m_handler,
java.lang.String chunkToken)
Attempts to read XML file in chunks, passing each chunk to a SAX parser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean readXMLChunk(java.io.BufferedReader reader,
org.xml.sax.helpers.DefaultHandler m_handler,
java.lang.String chunkToken)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
reader - the reader to read the XML fromm_handler - the SAX parser to feed the XML tochunkToken - the token to read. The parser will locate the first instance of
<chunkToken and will buffer all content, including the opening tag and up to
and including the closing </chunkToken> tag. It will not currently handle
<chunkToken/> instances, nor instances where more than one tag appears per line,
or extra spaces appear between the angle brackets, slashes, and tag name of the
tag we are searching for.
javax.xml.parsers.ParserConfigurationException - if there was a problem setting up the SAX parser.
org.xml.sax.SAXException - if there was a problem parsing the XML.
java.io.IOException - if there was a problem reading the XML from the reader.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||