public class Xml2TextHandler extends org.xml.sax.helpers.DefaultHandler
| Modifier and Type | Field and Description |
|---|---|
protected StringBuffer |
buf |
protected static SAXParserFactory |
factory |
protected SAXParser |
parser |
protected boolean |
trim |
| Constructor and Description |
|---|
Xml2TextHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String localName,
String name) |
SAXParser |
getParser() |
String |
getText() |
String |
parse(File file) |
String |
parse(InputSource is) |
String |
parse(InputStream in) |
void |
startDocument() |
void |
startElement(String uri,
String localName,
String name,
Attributes attributes) |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningprotected static final SAXParserFactory factory
protected StringBuffer buf
protected boolean trim
public Xml2TextHandler() throws SAXException, ParserConfigurationException
public String parse(File file) throws SAXException, IOException
SAXExceptionIOExceptionpublic String parse(InputStream in) throws SAXException, IOException
SAXExceptionIOExceptionpublic String parse(InputSource is) throws SAXException, IOException
SAXExceptionIOExceptionpublic void startDocument() throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void endElement(String uri, String localName, String name) throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void characters(char[] ch, int start, int length) throws SAXException
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerSAXExceptionCopyright © 2016 Nuxeo SA. All rights reserved.