1SAX.setDocumentLocator() 2SAX.startDocument() 3SAX.internalSubset(root, , ) 4SAX.entityDecl(foo, 1, (null), (null), abc) 5SAX.getEntity(foo) 6SAX.entityDecl(bar, 1, (null), (null), def) 7SAX.getEntity(bar) 8SAX.externalSubset(root, , ) 9SAX.getEntity(foo) 10SAX.startElement(root, attribute='&foo;') 11SAX.characters( 12 , 4) 13SAX.startElement(element) 14SAX.getEntity(bar) 15SAX.characters(def, 3) 16SAX.reference(bar) 17SAX.endElement(element) 18SAX.characters( 19, 1) 20SAX.endElement(root) 21SAX.endDocument() 22