public void toSAX(ContentHandler ch)
throws SAXException {
// Stream bytes and discard start/endDocument
XMLByteStreamInterpreter interp = new XMLByteStreamInterpreter();
EmbeddedXMLPipe pipe = new EmbeddedXMLPipe(ch);
// If ch is an XMLConsumer, set it as such so that XML comments are
// also deserialized.
if (ch instanceof XMLConsumer)
pipe.setConsumer((XMLConsumer) ch);
interp.setContentHandler(pipe);
interp.deserialize(xmlBytes);
}