Great you are. Hats off Graff!
You're just like that covered my requirement, am going to use your code straight away by adding a small computation. In additional I need to sum the x axis values of 'text" elements get collapsed.
As am new for perl modules bit hard to understand your logic; will manipulate the code per my req.
The hardest part is: Even I loaded the XML::LibXML module its showing error like cant locate the loadable object for module XML::LibXML...
Can't locate loadable object for module XML::LibXML in @INC (@INC cont +ains: C:/P erl/lib C:/Perl/site/lib .) at C:/Perl/lib/DynaLoader.pm line 153 BEGIN failed--compilation aborted at C:/Perl/lib/XML/LibXML.pm line 15 +3. Compilation failed in require at tocgen_v3.pl line 4. BEGIN failed--compilation aborted at tocgen_v3.pl line 4.
Don't know what the problem is, keep on trying...
And...regarding the necessity of root element in input XML; I have it already; I was missed this to provide.
Many Thanks to All

In reply to Re^2: Trouble in text manipulation by thirilog
in thread Trouble in text manipulation by thirilog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.