Hi All,
Wish you all a very happy and prosperous new year 2010.

I nee your help regarding following issue:

I have an xml of the form
<doc>
      <p>(a)- first level </p>
    <p>(1)- second level</p>
    <p>(2)- second level</p>
    <p>(A)- third level</p>
    <p>(B)- third level</p>
    <p>(3)- second level</p>
    <p>(b)- first level</p>
</doc>

A change in the designator(Designators may be in alpha, numeric, roman,
alpha-numeric,
etc bounded or unbounded by brackets) format must be used as basis for
identifying the primary level.
Designators in sequence or series must be treated as primary level text of
the same level. For example:
(a)-first level
(b)-first level
(c)-first level

I have to create the following output xml out of the above input xml:

<doc>
      <parent>
       <title>(a)- first level </title>
       <child><title>(1)- second level</title></child>
       <child>
        <title>(2)- second level</title>
        <child><title>(A)- third level</title></child>
        <child><title>(B)- third level</title></child>
       </child>
      <child><title>(3)- second level</title></child>
    </parent>
    <parent><title>(b)- first level</title></parent>

</doc>

Please advise, how to do this?
Thanks in advance.

Regards,
Anuj Kumar
Innodata Isogen
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to