Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.convert.plugins.text.extractors
Class Xml2TextHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.nuxeo.ecm.core.convert.plugins.text.extractors.Xml2TextHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class Xml2TextHandler
extends DefaultHandler

Author:
Bogdan Stefanescu

Constructor Summary
Xml2TextHandler()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xml2TextHandler

public Xml2TextHandler()
                throws SAXException,
                       ParserConfigurationException
Throws:
SAXException
ParserConfigurationException
Method Detail

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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.