Hello,
 
I am trying to convert html files to xml files.  I need to nest (copy) subsections in parent sections, and paragraphs in the corresponding sections .
 
Is it possible to do it with xsl?
 
Here is an example (knowing that the files are more complex than this):
 
h1 is the document title, h2 section title, h3 subsection title. <p> should go under the corresponding section, and section (h3) should go under the parent section (h2) in the output xml.
 
<html>
<body>
<h1>Document Title</h1>
<p>Content of paragraph 1</p>
<h2>Header 2</h2>
<p>First paragraph of section 1</p>
<p>Second paragraph of section 1</p>
<h3>Header 3</h3>
<p>Test de p dans 2eme para 3</p>
<h2>Header 2</h2>
<p>First paragraph of section 2</p>
</body>
</html>
 
To be converted into:
<document>
<title>Document Title</title>
<paragraph>Content of paragraph 1</paragraph>
    <section>
        <title>Header 2>/title>
          <paragraph>First paragraph of section 1</paragraph>
           <paragraph>Second paragraph of section 1</paragraph>
                <section>
                    <title>Header 3</title>
                    <paragraph>First paragraph of subsection 1</paragraph>
                </section>
         </section>
        <section>
          <paragraph> First paragraph of section 2</paragraph>
      </section>
</document>
 
Thanks,
PZN


Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici !