title: Limitation of beautifulsoap
body: <p>I am trying to convert xml to JSON using Beautifulsoup for the xml file having structure as below:</p>
  <pre><code>&lt;H3 id=&quot;LinkTarget_311&quot;&gt;ISSS.1.A1Acceptance of Overall(B)&lt;/H3&gt;
  
  &lt;Standard&gt;An organisation's Top Management.&lt;/Standard&gt;
  
  &lt;Standard&gt;The Top Management MUST define.&lt;/Standard&gt;
  
  &lt;H3 id=&quot;LinkTarget_3116&quot;&gt;ISS.2.A2Acceptance of Overall(C)&lt;/H3&gt;
  
  &lt;Standard&gt;An organisation's Top.&lt;/Standard&gt;
  
  &lt;Standard&gt;Top Management.&lt;/Standard&gt;
  
  &lt;H3 id=&quot;LinkTarget_316&quot;&gt;ISS.2.2Acceptance of Overall(D)&lt;/H3&gt;
  
  &lt;Standard&gt;An organisation's Top resource.&lt;/Standard&gt;
  
  &lt;Standard&gt;Top Management resource.&lt;/Standard&gt;
  ......
  .......
  </code></pre>
  <p>The code I wrote is as below :</p>
  <pre><code>
  extract2 = re.compile(r&quot;[A-Z][a-z]\w*&quot;)
  
  control_ids = {}
  header = bs_content.find_all('h3',{'id':True})
  sub = bs_content.find_all('standard')
  
  for i,j in zip(header,sub):
        
      req_id = str.strip(re.split(extract2,i.text)[0])
        
      control_ids[req_id] = j.text
  
  </code></pre>
  <p>The result is too long I an not paste all of it:</p>
  <p>Expected result: text of H3 tag paired with text of the following 'standard' tags</p>
  <p><code>[{ISSS.1.A1Acceptance of Overall(B) : 'An organisation's Top Management.Top Management.'} , {ISS.2.A2Acceptance of Overall(C):'An organisation's Top.Top Management.'},....]</code></p>