[JDEV] XML::Stream::Parser

Ryan Eatmon reatmon at jabber.org
Sun Nov 4 21:06:41 CST 2001


> Hello, I am having trouble with XML::Stream::Parser::parse
> function. It is not returning anything. What is strange is
> parsefile works and it seems to be using parse. Anyway, here
> is the code I do not get a return on.
>
> my $parser = new XML::Stream::Parser(style=>"Tree");
>
> my @tree = $parser->parse('<foo><test>hello</test></foo>');
>
> There is no data in tree. I was wondering if anyone could
> shed some light on this. If this is the wrong list I
> apologize. I am using XML::Stream v1.12.


If you look at the source for parsefile, you will see that it calls parse, but does not get return value from it either.  Instead it calls the returnData function to return the uncollected data.

-- 

Ryan Eatmon                   reatmon at jabber.org 
------------------------------------------------
Jabber.org - Perl Team    jid:reatmon at jabber.org






More information about the JDev mailing list