Project

Profile

Help

Support #3237 » PseudoXMLReader.java

Aniruddha Joag, 2017-05-25 17:44

 
package test.saxon.streaming.transformerhandler;

import org.xml.sax.*;
import org.xml.sax.helpers.XMLFilterImpl;

import java.io.IOException;

public class PseudoXMLReader extends XMLFilterImpl
{
private ContentHandler contentHandler;
@Override
public ContentHandler getContentHandler()
{
return contentHandler;
}

@Override
public void setContentHandler(ContentHandler handler)
{
System.out.println("PseudoXMLReader -> setContentHandler. handler = " + handler.getClass().getName());
contentHandler = handler;
}

@Override
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
{
// super.setFeature(name, value);
}

@Override
public void parse(InputSource input) throws SAXException, IOException
{
//do nothing - the sax events will be coming from the previous transform
}

@Override
public void parse(String systemId) throws SAXException, IOException
{
//do nothing - the sax events will be coming from the previous transform
}
}
(4-4/15)