title: How do I parse ill-structued html code?
body: <p>I have the following html code that I'd like to parse (some elements are stripped to enhance readability):</p>
  
  <pre><code>&lt;/div&gt;
              &lt;article class="article-detail-description"&gt;
                  &lt;h1 class="page-heading"&gt;
                      Postulat operacyjności definicji w naukach społecznych
                      &lt;br /&gt;&lt;small&gt;Definition’s Operativeness Postulate in Social Sciences&lt;/small&gt;
                  &lt;/h1&gt;
  
                  &lt;div&gt;
                      &lt;strong&gt;Author(s): &lt;/strong&gt;Jakub Karpiński&lt;br /&gt;&lt;strong&gt;Subject(s): &lt;/strong&gt;Social Sciences&lt;br /&gt;&lt;strong&gt;Published by: &lt;/strong&gt;Instytut Filozofii i Socjologii Polskiej Akademii Nauk&lt;br/&gt;&lt;strong&gt;Keywords: &lt;/strong&gt;operationism; definition of property; definition of indicator;  concepts selection
  &lt;br/&gt;
                  &lt;/div&gt;
                    &lt;p class="summary"&gt;&lt;strong&gt;Summary/Abstract: &lt;/strong&gt; 
  The article’s primary goal is to demonstrate the problems inherited in “operationism – antioperationism” polemics.
  &lt;/p&gt;
                  &lt;ul class="nav nav-tabs"&gt;
                      &lt;li class="active" &gt;&lt;a href="#details" data-toggle="tab"&gt;Details&lt;/a&gt;&lt;/li&gt;
  
                      &lt;li&gt;&lt;a href="#tableOfContents" data-toggle="tab"&gt;Contents&lt;/a&gt;&lt;/li&gt;
  
                  &lt;/ul&gt;
                  &lt;div class="tab-content"&gt;
                      &lt;div class="tab-pane fade active in" id="details"&gt;
                          &lt;p class="journal-link"&gt;&lt;strong&gt;Journal: &lt;/strong&gt;&lt;a href="/search/journal-detail?id=10"&gt;Studia Socjologiczne&lt;/a&gt;&lt;/p&gt;   
                          &lt;ul class="article-additional-info"&gt;
                              &lt;li&gt;&lt;strong&gt;Issue Year:&lt;/strong&gt; 2011&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Issue No:&lt;/strong&gt; 1 (200)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Page Range:&lt;/strong&gt; 65-80&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Page Count:&lt;/strong&gt; 15&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Language:&lt;/strong&gt; Polish&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>I can read all of it by using</p>
  
  <p><code>document.getElementsByClassName("article-detail-description")[0].textContent</code>.</p>
  
  <p>To read only <code>&lt;p class="summary"</code> I use:</p>
  
  <p><code>getElementsByClassName("summary")[0].textContent</code></p>
  
  <p>However, the latter is imperfect because it shows also <code>Summary/Abstract:</code>)</p>
  
  <p>I am interested in many elements, let's take the following as examples:</p>
  
  <p><strong>1</strong>. Postulat operacyjności definicji w naukach społecznych</p>
  
  <p>I can get:</p>
  
  <pre><code>Postulat operacyjności definicji w naukach społecznych
  Definition’s Operativeness Postulate in Social Sciences
  </code></pre>
  
  <p>To get it I use: <code>document.getElementsByClassName("page-heading")[0].innerText</code></p>
  
  <p>How do I get separately <code>Postulat operacyjności definicji w naukach społecznych</code> and <code>Definition’s Operativeness Postulate in Social Sciences</code>?</p>
  
  <p><strong>2</strong>. I'd like to get e.g. <code>2011</code> from:</p>
  
  <pre><code>`&lt;li&gt;&lt;strong&gt;Issue Year:&lt;/strong&gt; 2011&lt;/li&gt;&lt;li&gt;`
  </code></pre>
  
  <p>This time I have no clue whatsoever as to getting this information. The same is true for <code>Issue No:</code> and others.</p>