Code example for SAXSource

Methods: getInputSource, getXMLReader, setXMLReader

0
  } 
 
  public SAXSourceXMLEventReaderImpl(SAXSource source)
    throws XMLStreamException 
  { 
    XMLReader reader = source.getXMLReader();
 
    if (reader == null) {
      try { 
        reader = XMLReaderFactory.createXMLReader();
 
        source.setXMLReader(reader);
      }  
      catch (SAXException e) {
        throw new XMLStreamException(e);
      } 
    } 
 
    _contentHandler = new EventGeneratingContentHandler();
    reader.setContentHandler(_contentHandler);
 
    try { 
      reader.parse(source.getInputSource());
    } 
    catch (SAXException e) {
      throw new XMLStreamException(e);
    } 
    catch (IOException e) {