Methods Summary |
---|
private org.xml.sax.InputSource | copyInputSource(org.xml.sax.InputSource is)
final StringWriter out = new StringWriter();
final ToXMLStream xml = new ToXMLStream();
xml.setWriter(out);
final XMLReader r = getXMLReader();
r.setContentHandler(xml);
if (super.getEntityResolver() != null){
r.setEntityResolver(super.getEntityResolver());
}
r.parse(is);
final InputSource result= new InputSource(new StringReader(out.toString()){ public void close(){} });
result.setPublicId(is.getPublicId());
result.setSystemId(is.getSystemId());
return result;
|
private org.xml.sax.XMLReader | getXMLReader()
try{
final XMLReader xr = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
xr.setFeature("http://xml.org/sax/features/namespaces", true);
xr.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
return xr;
}
catch (ParserConfigurationException e){
throw new SAXException(e);
}
|
public void | parse(org.xml.sax.InputSource is)
final InputSource is2 = copyInputSource(is);
super.setContentHandler(frameHolderBuilder);
super.parse(is2);
is2.getCharacterStream().reset();
ve.setFramer(new Framer(frameHolderBuilder.getFrameHolder()));
ve.setParent(getParent());
ve.parse(is2);
|
public void | setContentHandler(org.xml.sax.ContentHandler contentHandler)
ve.setContentHandler(contentHandler);
|