HTML heading hierarchy for XHTML [RE-POST]

I'd like to preserve the implicit hierarchy of HTML headings when converting to XHTML. For example, I'd like to end up with this XHTML output:

<h1>Heading 1 text
        <h2>Heading 2 under heading 1</h2>
</h1>

given this HTML input:

<h1>Heading 1 text</h1>
        <h2>Heading 2 under heading 1</h2>

Would this translation be feasible as an option in Tidy?
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com?sr=mc.mk.mcm.tag001

Received on Monday, 31 January 2000 15:59:27 UTC