title: Navigating DOM in BeautifulSoup
body: <p>I'm currently able to find certain elements using the <code>findAll</code> function. Is there a way to navigate to their child? </p>
  
  <p>The code I have is:</p>
  
  <pre><code>data = soup.findAll(id="profile-experience")
  print data[0].get_text()
  </code></pre>
  
  <p>And it returns a block of text (for example, some of the text isn't spaced out properly)</p>
  
  <p>The DOM looks something like this</p>
  
  <pre><code>&lt;div id="profile-experience&gt;
    &lt;div class="module-body&gt;
      &lt;li class="position"&gt;
      &lt;li class="position"&gt;
      &lt;li class="position"&gt;
  </code></pre>
  
  <p>If I just do a <code>findAll</code> on <code>class="position</code> I get way too much crap back. Is there a way using BeautifulSoup to just find the elements that are <code>&lt;li class="position"&gt;</code> that are nested underneath <code>&lt;div id="profile-experience"&gt;</code></p>
  
  <p>I want to do something like this:</p>
  
  <pre><code>data = soup.findAll('li',attrs={'class':'position'}) 
  </code></pre>
  
  <p>(Where I'm only getting the nested data)</p>
  
  <pre><code>d in data:
    print d.get_text()
  </code></pre>