revamp ext/xmlreader