Methods Summary |
---|
private void | createParent()
XMLReader parent = null;
try {
SAXParserFactory pfactory = SAXParserFactory.newInstance();
pfactory.setNamespaceAware(true);
SAXParser saxparser = pfactory.newSAXParser();
parent = saxparser.getXMLReader();
}
catch (ParserConfigurationException e) {
throw new SAXException(e);
}
catch (FactoryConfigurationError e) {
throw new SAXException(e.toString());
}
if (parent == null) {
parent = XMLReaderFactory.createXMLReader();
}
// make this XMLReader the parent of this filter
setParent(parent);
|
public javax.xml.transform.Transformer | getTransformer()
return _transformer;
|
public void | parse(org.xml.sax.InputSource input)
XMLReader managedReader = null;
try {
if (getParent() == null) {
try {
managedReader = XMLReaderManager.getInstance()
.getXMLReader();
setParent(managedReader);
} catch (SAXException e) {
throw new SAXException(e.toString());
}
}
// call parse on the parent
getParent().parse(input);
} finally {
if (managedReader != null) {
XMLReaderManager.getInstance().releaseXMLReader(managedReader);
}
}
|
public void | parse(java.lang.String systemId)
parse(new InputSource(systemId));
|
public void | setContentHandler(org.xml.sax.ContentHandler handler)
_transformerHandler.setResult(new SAXResult(handler));
if (getParent() == null) {
try {
createParent();
}
catch (SAXException e) {
return;
}
}
getParent().setContentHandler(_transformerHandler);
|
public void | setErrorListener(javax.xml.transform.ErrorListener handler)
|