title: How do I assign values to specific values for multiple children?
body: <p>From my previous question, I asked how to parse multiple siblings from the same child, now I am curious how you take each output and have it equal to a unique variable. For example, I want Unkown out equal to Occupation and 656 equal to CarrierCode, and so on.</p>
  <pre><code>from bs4 import BeautifulSoup
  xml='''
  from bs4 import BeautifulSoup
  
  xml='''
  &lt;AdditonalAttributes&gt;
      &lt;Attribute&gt;
          &lt;Name&gt; Occupation &lt;/Name&gt; 
          &lt;Value&gt; Unknown &lt;/Value&gt;
      &lt;/Attribute&gt;
      &lt;Attribute&gt;
          &lt;Name&gt; CarrierCode &lt;/Name&gt;
          &lt;Value&gt; 656 &lt;/Value&gt;
      &lt;/Attribute&gt;
  &lt;AdditonalAttributes&gt;
  '''
  
  soup = BeautifulSoup(xml, 'xml')
  
  for a in soup.select('Attribute'):
      if a.Name.get_text(strip=True) in ['Occupation','CarrierCode']:
          print(a.Value.get_text(strip=True))
  </code></pre>
  <p>Output:</p>
  <pre><code>Unknown
  656
  </code></pre>