org.nuxeo.ecm.core.convert.plugins.text.extractors
Class Xml2TextHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.nuxeo.ecm.core.convert.plugins.text.extractors.Xml2TextHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class Xml2TextHandler
- extends DefaultHandler
- Author:
- Bogdan Stefanescu
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Xml2TextHandler
public Xml2TextHandler()
throws SAXException,
ParserConfigurationException
- Throws:
SAXException
ParserConfigurationException
getParser
public SAXParser getParser()
parse
public String parse(File file)
throws SAXException,
IOException
- Throws:
SAXException
IOException
parse
public String parse(InputStream in)
throws SAXException,
IOException
- Throws:
SAXException
IOException
parse
public String parse(InputSource is)
throws SAXException,
IOException
- Throws:
SAXException
IOException
getText
public String getText()
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DefaultHandler
- Throws:
SAXException
startElement
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String name)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.