Hi monks
Im now doing XML conversion job from a plain text file which has been pre-edited for conversion convenience.
Im having the text file in which there are four types of lists are there.
they are numberedlist which is pre-edited with <nl>, unnumberedlist with <un>, titled numberedlist <tl> and unnumbered title list <utl>.
A part of my input file is like this:
<nl> slkjslkjslkjslks slkjslkjslkjslkjs slkslkjslkjsl <utl>lksjlkjslkjs lskjslkjslkjs slkjslkjslkjslkj </utl> <un>lkslskjlkjs <nl>lksjlksj lkjlkjl </nl> </un> </nl>
This is just a single instance of the nesting in the file. there are so many occurences are there in such a way that any list tag may consist of any number of list tags inside in any order in it, even itself inside. The above input has to be converted as :
<list type="numbered"> <listitem>slkjslkjslkjslks</listitem> <listitem>slkjslkjslkjslkjs</listitem> <listitem>slkslkjslkjsl</listitem> <listitem><list type="unnumeredtitle"><listitem>lksjlkjslkjs</listitem +> <listitem>lskjslkjslkjs</listitem> <listitem>slkjslkjslkjslkj</listitem> </list></listitem><listitem><list type="unnumbered"><listitem>lkslskjl +kjs</listitem> <listitem><list type="numbered"><listitem>lksjlksj</listitem> <listitem>lkjlkjl</listitem> </list></listitem> </list></listitem> </list>
How should i start convert this text file into valid XML file
My english is not that good.
Please Give ur suggestions.
Thanks in advance.
--Murugesan--
In reply to Recursive lists by murugu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |