This part of your XML is likely to cause you trouble:
<chapter>sathish <subchap1>sathish is good boy or not <p>sathish is a good bou</p>
The <chapter> element contains what is called 'mixed content' - a mixture of text and other elements. There is nothing inherently wrong with mixed content (XHTML for example uses it extensively) as long as you choose appropriate tools to work with it. XML::Simple is not an appropriate module for working with mixed content - it says as much in the documentation.
You might consider changing your XML to something like:
<chapter><title>sathish</title> <subchap1><title>sathish is good boy or not</title> <p>sathish is a good bou</p>
Even once you have done this, I still would not recommend XML::Simple for the job. Consider reading this article on Stepping up from XML::Simple to XML::LibXML.
In reply to Re: xml tag mapping?
by grantm
in thread xml tag mapping?
by satzbu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |