I am trying to compare new xml file with existing xml inside the basex database('db') but it checks only the existence of the file within 'db' and it is returning true whether contents are same or not.
I also want to check contents of xml file which i am passing with matching xml file inside the database('db').So that if contents are same then it should be return 'true' otherwise false.
Please any one can help me to provide the best way.
String query = "for $doc in collection('db') return if(matches(document-uri($doc),'"+xmlFile+"')) then true() else false()";