|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.HandlerBase org.apache.jetspeed.util.SAXPIFilter
This class is used to either strip and/or insert PIs in a XML document. It uses SAX-1 API and outputs text to an output stream. WARNING: This behavior will be modified in the future.
Field Summary | |
protected java.io.PrintWriter |
out
|
Constructor Summary | |
SAXPIFilter(java.io.PrintWriter outPW)
Creates of simple parser which outputs its document to the PrintWriter passed as arguments. |
|
SAXPIFilter(java.io.PrintWriter outPW,
boolean strip)
In this mode the parser may be used as a simple well-formedness checker or a PI stripper. |
|
SAXPIFilter(java.io.PrintWriter outPW,
boolean strip,
java.lang.String PI)
In this mode the parser can strip existing PIs and insert new ones just after the document declaration |
Method Summary | |
void |
addProcessingInstruction(java.lang.String pi)
|
void |
characters(char[] ch,
int start,
int length)
SAX Handler implementation |
void |
endDocument()
SAX Handler implementation |
void |
endElement(java.lang.String name)
SAX Handler implementation |
void |
error(org.xml.sax.SAXParseException ex)
SAX Handler implementation |
void |
fatalError(org.xml.sax.SAXParseException ex)
SAX Handler implementation |
java.lang.String[] |
getProcessingInstructions()
Get all permitted processing instructions |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
SAX Handler implementation |
protected java.lang.String |
normalize(java.lang.String s)
Escapes characters data |
void |
print(java.io.InputStream in)
Parse and output the content of the stream |
void |
print(java.io.Reader in)
Parse and output the content of the reader |
void |
print(java.lang.String uri)
Parse and output the content of the URL given as parameter. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
SAX Handler implementation |
void |
startDocument()
SAX Handler implementation |
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList attrs)
SAX Handler implementation |
void |
warning(org.xml.sax.SAXParseException ex)
SAX Handler implementation |
Methods inherited from class org.xml.sax.HandlerBase |
notationDecl, resolveEntity, setDocumentLocator, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.PrintWriter out
Constructor Detail |
public SAXPIFilter(java.io.PrintWriter outPW) throws java.io.UnsupportedEncodingException
outPW
- the printWriter where to output parsed datapublic SAXPIFilter(java.io.PrintWriter outPW, boolean strip) throws java.io.UnsupportedEncodingException
outPW
- the printWriter where to output parsed datastrip
- configure the parser to strip PIs if strip is truepublic SAXPIFilter(java.io.PrintWriter outPW, boolean strip, java.lang.String PI) throws java.io.UnsupportedEncodingException
outPW
- the printWriter where to output parsed datastrip
- configure the parser to strip PIs if strip is truePI
- string reprensenting the PI to be output after the document declarationMethod Detail |
public java.lang.String[] getProcessingInstructions()
public void addProcessingInstruction(java.lang.String pi)
public void print(java.lang.String uri)
uri
- URL where to fetch the document to be parsedpublic void print(java.io.InputStream in)
in
- a content InputStreampublic void print(java.io.Reader in)
in
- a content Readerpublic void processingInstruction(java.lang.String target, java.lang.String data)
public void startDocument()
public void startElement(java.lang.String name, org.xml.sax.AttributeList attrs)
public void characters(char[] ch, int start, int length)
public void ignorableWhitespace(char[] ch, int start, int length)
public void endElement(java.lang.String name)
public void endDocument()
public void warning(org.xml.sax.SAXParseException ex)
public void error(org.xml.sax.SAXParseException ex)
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.String normalize(java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |