if(Type.subTypeOf(p.getType(), Type.DOCUMENT)) { serializeToReceiver(p.getDocument(), generateDocEvent); return; }
    protected void serializeToReceiver(NodeProxy p, boolean generateDocEvent)    throws SAXException {    	setDocument(p.getDocument());    	if (generateDocEvent) receiver.startDocument();        Iterator domIter = broker.getNodeIterator(p);        serializeToReceiver(null, domIter, p.getDocument(), p.gid, true, p.getMatches(), new TreeSet());        if (generateDocEvent) receiver.endDocument();    }