title: AS3 HTML to CSS3 and back
body: <p>using php, how would you convert...</p>
  
  <pre><code>&lt;P ALIGN="LEFT"&gt;
              &lt;FONT FACE="Helvetica" SIZE="25" COLOR="#000000" LETTERSPACING="0" KERNING="0"&gt;
                  &lt;B&gt;
                      &lt;I&gt;Cras id sapien odio. Vestibulum &lt;/I&gt;
                  &lt;/B&gt;
                      &lt;FONT COLOR="#006633"&gt;
                          &lt;B&gt;
                              &lt;I&gt;ante&lt;/I&gt;
                          &lt;/B&gt;
                          &lt;FONT SIZE="19"&gt;
                              ipsum primis in faucibus orci luctus et &lt;I&gt;ante ultrices&lt;/I&gt; posuere cubilia Curae;
                              &lt;FONT COLOR="#000000"&gt;&lt;/FONT&gt;
                          &lt;/FONT&gt;
                      &lt;/FONT&gt;
              &lt;/FONT&gt;
          &lt;/P&gt;
  </code></pre>
  
  <p>to something like</p>
  
  <pre><code>&lt;p&gt;&lt;font style="etc"&gt;Cras id sapien odio. Vestibulum&lt;/font&gt;&lt;font style="etc"&gt;ante&lt;/font&gt;&lt;font style="etc"&gt;ipsum primis in faucibus orci luctus et ante ultrices posuere cubilia Curae&lt;/font&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I am trying to flatten out and reduce recursion in the DOM, and then I have to switch to back to html 1.0. This code I am writing is moving HTML between flash and css3 so ios users can view the html animation, and everyone else is viewing flash. Unfortuantely the first html is what flash outputs. I am messing around with DOMDocument, any ideas?</p>