I'm trying to find a node in my XML document, but it should be within a specific parent. Here's what the XML looks like -
Here, "Methods" is the main title, but "Western Blotting" is the subtitle. If I just want to capture the titles, then I'd want to look for "article/sec/title", but if I want only subtitles, I'd look for "articles/sec/sec/title". I'm using xerces. Here's what I've got -
But this gets all the titles (including sub-titles). I tried replacing "title" with "article/sec/title" and "article::sec::title", but that just returns no nodes. Searched online, but didn't find anything.