This is an example of an XPath I’ve used before to get the nodes with a non-empty attribute:
// Where rows have a non-empty subtag called field with a name attribute equal to attrib1, select the rows
XmlNodeList nodeList = xmlDocument.SelectNodes("./idc:row[./idc:field[@name='attrib1'][text()]]", xmlnsmgr);
Note: the key part in this XPath is the text() part.
I’m not totally convinced this is the correct XPath to be using.
Of course there is also the node() function.
Combining these with not (e.g. not(node())) may yield the correct way to do it.