in reply to XML::Twig error handling

Hi,

Im about to go to bed but from memory have a look at safe_parsefile and safe_parse from the documentation.

Hope this helps point you in the right direction.

Martin

Replies are listed 'Best First'.
Re^2: XML::Twig error handling
by ramya2005 (Scribe) on Sep 19, 2005 at 23:47 UTC
    Hi thanks for pointing me to the documentation!
    I used the safe_parsefile function. Even then the program dies after executing that call. It is not moving forward to the next line where I check the error.
      safe_parsefile is works fine if there is no specified file or directory.
      $tree -> safe_parsefile('c:/temp.xml'); warn $@ if $@;
      Is there a way to handle to the 'no such attribute' or 'no such tag' errors in the TWIG HANDLER?