Analysis of XML documents