Rebuilt around the XMLAPI.