Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 74819
Status: rejected
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: dirkus [...] yopmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Allow push parser to be used in conjuction with pull or sax parser
Download (untitled) / with headers
text/plain 711b
If parsing a large xml document or endless xml stream over the network, the pull parser (XML::LibXML::Reader) can't be used with an event loop because it will block. The push parser (parse_chunk) seems like the ideal method to push the data to the parser as it arrives, but it requires the user to manually identify well-balanced chunks (by passing the terminate flag or calling finish_push). I am requesting that either the API be extended to make this more convenient for the user to use the push parser to add data and the pull parser to consume it, or add some documentation to accomplish something similar. The end goal is to allow non-blocking parsing of large documents or xml streams with an event loop.
Download (untitled) / with headers
text/plain 916b
Hi, On Thu Feb 09 07:11:56 2012, dirk wrote: Show quoted text
> If parsing a large xml document or endless xml stream over the network, > the pull parser (XML::LibXML::Reader) can't be used with an event loop > because it will block. The push parser (parse_chunk) seems like the > ideal method to push the data to the parser as it arrives, but it > requires the user to manually identify well-balanced chunks (by passing > the terminate flag or calling finish_push). I am requesting that either > the API be extended to make this more convenient for the user to use the > push parser to add data and the pull parser to consume it, or add some > documentation to accomplish something similar. The end goal is to allow > non-blocking parsing of large documents or xml streams with an event loop.
thanks for the request. Do you know if libxml2 (the one written in C) provides a similar functionality somehow? Regards, -- Shlomi Fish
From: dirkus [...] yopmail.com
Download (untitled) / with headers
text/plain 348b
On Sat Feb 11 06:09:26 2012, SHLOMIF wrote: Show quoted text
> thanks for the request. Do you know if libxml2 (the one written in C) > provides a similar functionality somehow?
I am only familiar with the Perl interface and do not know C, but I tried searching the libxml site. I didn't find anything there, but that could be because the documentation is lacking.
From: dirkus [...] yopmail.com
This looks like this is what I was after: https://metacpan.org/release/XML-LibXML-SAX-ChunkParser
Download (untitled) / with headers
text/plain 205b
Hi Dirk, On Mon Feb 27 21:43:09 2012, dirk wrote: Show quoted text
> This looks like this is what I was after: > https://metacpan.org/release/XML-LibXML-SAX-ChunkParser
so may I close this bug? Regards, ā€” Shlomi Fish
Download (untitled) / with headers
text/plain 331b
On Fri Mar 16 12:16:02 2012, SHLOMIF wrote: Show quoted text
> Hi Dirk, > > On Mon Feb 27 21:43:09 2012, dirk wrote:
> > This looks like this is what I was after: > > https://metacpan.org/release/XML-LibXML-SAX-ChunkParser
> > so may I close this bug? > > Regards, > > ā€” Shlomi Fish
Closing due to finding a fix and a lack of responsiveness.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.