in reply to Re^2: XML::Twig usage incomprehension
in thread XML::Twig usage incomprehension

I read it a thousand times or more. Not from top to bottom, but using /searchword and then reading. I actually never read anything about $job->att('attributename') and was always asking myself, why I had to use a hash here. I never had the idea to search further. Thanks for pointing me at it!

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^4: XML::Twig usage incomprehension
by Jerome (Initiate) on Apr 03, 2006 at 07:36 UTC
    I tried this method but still have no results :(
    
    Though,I'm sure that I should get some ....
    Is there something wrong with my code?
    
    
    use strict; use XML::Twig; my $t= new XML::Twig(); my $root = $t->root; $t->parsefile( 'T:\\BI\\Jerome\\xml\\tree.xml'); exit; sub job { my ($t, $root)= @_; my %job; $job{Attr_name}= $root->{'att'}->{'Name'}; $job{Attr_value}= $root->{'att'}->{'Value'}; print "$job{Attr_name}: $job{Attr_value}\n"; $root->delete; }
      There are no attributes called 'Name' or 'Value' in your Element named 'Job'.
      <Job Identifier="adresses" DateModified="2006-03-28" TimeModified=" +17.15.15">

      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e