Dealing with structural patterns of XML documents