Hi Nancy--
OK, great. So to answer your follow-up questions:
- Yes, to limit the search to specific elements, simply replace "*" in the XPath expression with an explicit tag name. For example, to find <cite.state.law> elements without a ref attribute, you would use: "//cite.state.law[not(@ref)]". (It gets a little trickier if you are using namespaces, but there are ways around that.)
- To go to each instance, see my original reply above. The strategies outlined there (via either ACL function or command line commands) should work fine once you get the XPath expression tweaked to collect just the items you are interested in.
Note that XPath is extremely powerful, and can let you specify complex element constraints. For example, if you wanted to get <cite.state.law> elements with no "ref" attribute, but only if they are inside <cite.state> elements where the "state.name" attribute is "MN", you could do something like this:
//cite.state[@state.name="MN"]//cite.state.law[not(@ref)]
So, if you get to know XPath well, you can be very precise in selecting exactly the elements you want (and only those elements). There are plenty of tutorials online to help you learn to use the full power of XPath. A quick Google search should turn up lots of good hits.
--Clay