MarkLogic Find all doc uris which contains null node for given xpath -
xquery (marklogic) having problem doc uris given xpath contains null node, allow me know if can provide thought on how it.
<person id="1"> <details> <contact> <name>bob</name> <city>oakland</city> </contact> <otherinfo> <cars> <car> <brand>honda<brand> <model>accord</model> <brand/> </car> </cars> </otherinfo> </details> </person> <person id="2"> <details> <contact> <name>chris</name> <city>buffalo</city> </contact> <otherinfo> <cars> <car/> </cars> </otherinfo> </details> </person>
i looking find docs not have element value car; auto empty node.
xpath = /person/details/otherinfo/cars/car
homecoming doc corresponding id =2 only
if auto nowadays has kid elements, this:
/person/details/otherinfo/cars/car[empty(*)]
marklogic
No comments:
Post a Comment