title: Faceting on XML tag values
body: <p>I want to do faceting on xml tags, and sub faceting on the tag values, I have an xml documents like below</p>
  
  
  
  <pre><code>&lt;TermiteJServiceResponse&gt;
    &lt;EntityTypeHit type="DRUG"&gt;
      &lt;HitCollection&gt;
        &lt;Hit type="DRUG" id="CHEMBL1201288"&gt;
          &lt;Name&gt;Dantrolene&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="DRUG" id="CHEMBL286398"&gt;
          &lt;Name&gt;Propylene Glycol&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="DRUG" id="GXC376D7F8C0E7A0C3787E8A2384DC56E80"&gt;
          &lt;Name&gt;PEG400&lt;/Name&gt;
        &lt;/Hit&gt;
      &lt;/HitCollection&gt;
    &lt;/EntityTypeHit&gt;
    &lt;EntityTypeHit type="COMPOUNDS"&gt;
      &lt;HitCollection&gt;
        &lt;Hit type="COMPOUNDS" id="A-409912.5"&gt;
          &lt;Name&gt;A-409912.5&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="COMPOUNDS" id="A-409912"&gt;
          &lt;Name&gt;A-409912&lt;/Name&gt;
        &lt;/Hit&gt;
      &lt;/HitCollection&gt;
    &lt;/EntityTypeHit&gt;
    &lt;EntityTypeHit type="GENE"&gt;
      &lt;HitCollection&gt;
        &lt;Hit type="GENE" id="TRH"&gt;
          &lt;Name&gt;thyrotropin-releasing hormone&lt;/Name&gt;
        &lt;/Hit&gt;
      &lt;/HitCollection&gt;
    &lt;/EntityTypeHit&gt;
    &lt;EntityTypeHit type="BIOPROC"&gt;
      &lt;HitCollection&gt;
        &lt;Hit type="BIOPROC" id="BP70302"&gt;
          &lt;Name&gt;infusion&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="D009200"&gt;
          &lt;Name&gt;Myocardial Contraction&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="BP70198"&gt;
          &lt;Name&gt;cmax values&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="D001835"&gt;
          &lt;Name&gt;Body Weight&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="D062186"&gt;
          &lt;Name&gt;Arterial Pressure&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="BP70209"&gt;
          &lt;Name&gt;contractility&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="D006339"&gt;
          &lt;Name&gt;Heart Rate&lt;/Name&gt;
        &lt;/Hit&gt;
        &lt;Hit type="BIOPROC" id="BP70316"&gt;
          &lt;Name&gt;intravenal&lt;/Name&gt;
        &lt;/Hit&gt;
      &lt;/HitCollection&gt;
    &lt;/EntityTypeHit&gt;
    &lt;EntityTypeHit type="SPECIES"&gt;
      &lt;HitCollection&gt;
        &lt;Hit type="SPECIES" id="D051381"&gt;
          &lt;Name&gt;Rats&lt;/Name&gt;
        &lt;/Hit&gt;
      &lt;/HitCollection&gt;
    &lt;/EntityTypeHit&gt;
  
  &lt;/TermiteJServiceResponse&gt;
  </code></pre>
  
  <p>I would like to facet based on in above document DRUGS and sub facet on Drug names and similarly Compounds and sub facet on Compound Name</p>