XML document structure checker