Marklogic query based on values of multiple attributes of the same element
问题 I have the following xmls: sample1.xml <root> <subjectInfo> <subject id="001"/> <subject id="002" role="cross"/> </subjectInfo> </root> sample2.xml <root> <subjectInfo> <subject id="002"/> <subject id="001" role="cross"/> </subjectInfo> </root> I am searching for the documents where value of id attribute of subject is "001" but role (if it's there) of the same subject element is not "cross".So, In my example the result should contain sample1.xml and not sample2.xml I thought the following