Skip Menu |
 

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

Report information
The Basics
Id: 57674
Status: open
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: phish [...] cpan.org
Cc:
AdminCc:

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



Subject: domReadWellBalancedString() is never used to read a string directly into the context of a document
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 700
Download (untitled) / with headers
text/plain 700b
Hi, after discussing this issue with a colleague, I figured out that XML::LibXML does not allow developers to parse a XML chunk directly into the context of a document. This is interesting because all internal function would support this. Parsing a chunk directly into a Document would make an additional import of the the fragment unnecessary. A possible solution would be to add an optional document node parameter to parse_xml_chunk(). The interface of parse_balanced_chunk() would allow then the following syntax: $fragment = $parser->parse_balanced_chunk($chunk, $encoding, $document); This would speed up DOM operations when the fragment is inserted into the document. Best Christian
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6786-1274387383-1940.57674-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1088
Hallo Christian, I have spotted this as well some time ago. I planned to add the optional agrument and I think I even have the change somewhere. But calling the function sometimes caused crashes which I didn't time to investigate at that point. Hopefully I will get to it at some point. -- Petr On Thu May 20 13:36:04 2010, PHISH wrote: Show quoted text
> Hi, > > after discussing this issue with a colleague, I figured out that > XML::LibXML does not allow developers to parse a XML chunk directly into > the context of a document. This is interesting because all internal > function would support this. > > Parsing a chunk directly into a Document would make an additional import > of the the fragment unnecessary. > > A possible solution would be to add an optional document node parameter > to parse_xml_chunk(). > > The interface of parse_balanced_chunk() would allow then the following > syntax: > > $fragment = $parser->parse_balanced_chunk($chunk, $encoding, $document); > > This would speed up DOM operations when the fragment is inserted into > the document. > > Best > Christian


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.