Re: XML::LibXML: How to tell parse_balanced_chunk what DTD to use?
Robin Berjon <[email protected]> Fri, 17 Sep 2010 13:10:14 +0200
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
On Sep 17, 2010, at 12:51 , Reuben Thomas wrote: > On 17 September 2010 11:13, Robin Berjon <[email protected]> wrote: >> None that I know of, but there could be some way I haven't thought of. You might think it strange, but parse_balanced_chunk isn't a typical XML parser functionality in the first place so I wouldn't be surprised if it weren't all that generic. > > Sure, but the underlying libxml2 API would seem to support this > functionality; at least it has the information it needs: > > int xmlParseBalancedChunkMemory (xmlDocPtr doc, > xmlSAXHandlerPtr sax, > void * user_data, > int depth, > const xmlChar * string, > xmlNodePtr * lst) > > In particular, it takes a doc, whereas parse_balanced_chunk is a > parser method, not a document method. Well, if libxml2 supports it, and since you've just shown that you know way more C than I ever will, I might be tempted to facetiously suggest writing a patch ;) -- Robin Berjon - http://berjon.com/ _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs