I\'m using XPATH 1.0 parsers alongside CLiXML in my JAVA project, I\'m trying to setup a CLiXML constraint rules file.
I would like to show an error if there are duplica
Just try to get list of subnodes with appropriate path expression and check for duplicates in that list:
XPathExpression xPathExpression = xPath.compile("//parentNode/*");
NodeList children = (NodeList) xPathExpression.evaluate(config, XPathConstants.NODESET);
for (int i = 0; i < children.getLength(); i++) {
// maintain hashset of clients here and check if element is already there
}