Les nouvelles de XML::Twig

Thierry B. oulala at chez.com
Mon Aug 20 05:52:04 CDT 2001


[Toulouse.pm]

Michel Rodriguez wrote:
> 
> M'enfin ca doit ressembler a ca:
> 
> my $t= XML::Twig->new();
> my $agent= LWP::UserAgent->new;
> $agent->proxy( [qw(ftp http)] => 'http://jaguar.nfrance.com:3128');
> $t->parseurl( 'http://www.xmltwig.com/xmltwig/tutorial/nba.xml', $agent);
> je_fais_des_trucs_super_avec( $t);
> 
> cool non?
> 

  dans http://www.xmltwig.com/xmltwig/quick_ref.html et si j'ai bien compris
le tableau, je vois que twig supporte les methodes print et flush. or j'ai:

Can't call method "_flush" on unblessed reference at
		/usr/local/lib/site_perl/XML/Twig.pm line 1662.

  sur ce genre de code, alors que le print se passe comme je pense
qu'il doit se passer...

$twig->set_pretty_print("indented");
$twig->parseurl( $url, $agent);
$twig->print;
$twig->flush;

  d'autre part, j'ai quelques soucis avec les caractères français. je n'ai 
pas tout saisi sur la gestion des jeux de caractères :(


-- 
Thierry, 42++



More information about the Toulouse-pm mailing list