ANN: Version 2.27 of Perl module XML::Parser released
coopercc at netheaven.com
Sun Sep 26 01:57:20 BST 1999
I've uploaded Version 2.27 of XML::Parser to CPAN. In addition to some
bug fixes, there are some new features in this release.
After explaining at some length on the perl-xml mailing list why ExpatNB
didn't support the original_string and the position_in_context methods, I
went ahead and fixed the underlying problem (along with some bugs.) So
ExpatNB supports all the methods that Expat does (with the exceptions of
parse and parsefile).
There's a new expat method: skip_until. It takes a single required argument,
an integer indicating an element index (see the element_index method). This
method suspends handlers until the given elment index is reached. Parsing
proceeds very rapidly when handlers are suspended. I see this being used for
multi-pass parsing or filtering.
There's a new utility in the samples directory, canonical. It transforms an
XML document read from the standard input into Canonical XML on the standard
output. See http:://www.w3.org/TR/xml-c14n for a definition of Canonical XML.
There's a fix for the "Modification of a read-only value" bug that users
of perl 5.004 were encountering. This is really a bug in perl 5.004 that
was fixed in 5.005, but since XML::Parser is intended to run under 5.004,
this work-around was made.
*** I've made an incompatible change to the xml_escape method of Expat. It
no longer transforms the '>' character by default. To get the previous
behavior, use $xp->xml_escape($string, '>', ...). I realized the interface
needed to be changed while working on the canonical utility.
Other minor changes can be gleaned from the relevant part of the Changes file:
2.27 Sat Sep 25 18:26:44 EDT 1999
- Corrected documentation in Parser.pm
- Deal with XML_NS and XML_BYTE_ORDER macros in Expat/Makefile.PL
- Chris Thorman <chris at thorman.com> noted that "require 'URI::URL.pm'"
in Parser.pm was in error (should be "require 'URI/URL.pm'")
- Andrew McNaughton <andrew at scoop.co.nz> noted "use English" and
use of '$&' slowed down regex handling for whole application, so
they were excised from XML::Parser::Expat.
- Work around "modification of read-only value" bug in perl 5.004
- Enno Derksen <enno at att.com> reported that the Doctype handler
wasn't being called when ParseParamEnt was set.
- Now using Version 19990728 of expat, with local patches.
- Got rid of shadow buffer
o thus fixed the error reported by Ashley Sanders
<a.sanders at mcc.ac.uk>
o and removed ExpatNB limitations that Peter Billam
<music at pjb.com.au> noted.
- Vadim Konovalov <vkonovalov at lucent.com> had a problem compiling
for multi-threading that was fixed by changing Perl_sv_setsv to
- Added new Expat method: skip_until(index)
- Backward incompatible change to method xml_escape: to get former
behavior use $xp->xml_escape($string, '>', ...)
- Added utility, canonical, to samples
Clark Cooper Software Engineer Home: coopercc at netheaven.com
Schenectady, NY USA Work: cccooper at ltionline.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev