preliminary SQL and XML parsing