Towards flexible similarity analysis of XML data