ANN: Version 2.27 of Perl module XML::Parser released

Clark Cooper coopercc at
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::// 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
	- Deal with XML_NS and XML_BYTE_ORDER macros in Expat/Makefile.PL
	- Chris Thorman <chris at> noted that "require ''"
	  in was in error (should be "require 'URI/'")
	- Andrew McNaughton <andrew at> 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> 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>
	  o  and removed ExpatNB limitations that Peter Billam
             <music at> noted.
	- Vadim Konovalov <vkonovalov at> 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
			Schenectady, NY	USA	Work:   cccooper at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list