public class SaxParserAdaptor extends Object implements ParserAdaptor
Modifier and Type | Class and Description |
---|---|
class |
SaxParserAdaptor.SaxFormatHandler
Inner class to handle SAX parsing of XML files
|
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
SaxParserAdaptor() |
Modifier and Type | Method and Description |
---|---|
static void |
clearDtdCache() |
static Map |
getDtds() |
protected SAXParser |
getParser()
Get a Parser from the SAX Parser factory
|
void |
parse(Rewriter rewriter,
Reader reader)
Parses a document from the reader, without actually rewriting URLs.
|
void |
rewrite(Rewriter rewriter,
Reader reader,
Writer writer)
Parses and rewrites a document from the reader, rewriting URLs via the rewriter's events to the writer.
|
public void parse(Rewriter rewriter, Reader reader) throws RewriterException
ParserAdaptor
parse
in interface ParserAdaptor
reader
- the input stream over the content to be parsed.RewriterException
public void rewrite(Rewriter rewriter, Reader reader, Writer writer) throws RewriterException
ParserAdaptor
rewrite
in interface ParserAdaptor
reader
- the input stream over the content to be parsed.writer
- the output stream where content is rewritten to.RewriterException
protected SAXParser getParser() throws ParserConfigurationException, SAXException
ParserConfigurationException
SAXException
public static Map getDtds()
public static void clearDtdCache()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.