title: get elements by tag name in xml parsing, excluding children of some parents
body: <p>I have a xml file which I am parsing. Though some of the tag names happened to occur multiple times, under different parent name. I know which parent's child I want to ignore. How can I do that? </p>
  
  <pre><code> &lt;sub-article id="S01" article-type="translation" xml:lang="pt"&gt;
    &lt;front-stub&gt;
       &lt;article-categories&gt;
          &lt;subj-group subj-group-type="heading"&gt;
             &lt;subject&gt;Artigos Originais&lt;/subject&gt;
          &lt;/subj-group&gt;
       &lt;/article-categories&gt;
       &lt;title-group&gt;
          &lt;article-title&gt;
             Prevalência de deficiência nutricional em pacientes com
              tuberculose pulmonar
             &lt;xref ref-type="fn" rid="fn02"&gt;*&lt;/xref&gt;
          &lt;/article-title&gt;
       &lt;/title-group&gt;
     &lt;/front-stub&gt;
    &lt;/article-categories&gt;
   &lt;/sub-article&gt;        
      .....
      .....
   &lt;article-meta&gt;
       &lt;article-id pub-id-type="pmid"&gt;24068270&lt;/article-id&gt;
       &lt;article-id pub-id-type="pmc"&gt;4075858&lt;/article-id&gt;
       &lt;article-id pub-id-type="publisher-id"&gt;S1806-37132013000400012&lt;/article-id&gt;
       &lt;article-id pub-id-type="doi"&gt;10.1590/S1806-37132013000400012&lt;/article-id&gt;
       &lt;article-categories&gt;
          &lt;subj-group subj-group-type="heading"&gt;
             &lt;subject&gt;Original Articles&lt;/subject&gt;
          &lt;/subj-group&gt;
       &lt;/article-categories&gt;
       &lt;title-group&gt;
          &lt;article-title&gt;
             Prevalence of nutritional deficiency in patients with
             pulmonary tuberculosis
             &lt;xref ref-type="fn" rid="fn01"&gt;*&lt;/xref&gt;
          &lt;/article-title&gt;
       &lt;/title-group&gt;
      &lt;article-meta&gt;
  </code></pre>
  
  <p>In this example, I dont want to process the children under sub-article tag. So, "article-title" would be processed only for "Prevalence of nutritional deficiency in patients with pulmonary tuberculosis", not "Prevalência de deficiência nutricional em pacientes com tuberculose pulmonar"</p>
  
  <p>I am currently following code, which returns me all the nodes having name "title-group. How can I make it specific so I dont get it from certain parent.</p>
  
  <pre><code>NodeList titleNodeList = document.getElementsByTagName("title-group");
  </code></pre>