The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Parser::REX - XML Shallow Parsing with Regular Expressions

SYNOPSIS

  use XML::Parser::REX;
  my @tokens = XML::Parser::REX::ShallowParse ("<xml>Hello, World</xml>");

SUMMARY

See this very interesting read. http://www.cs.sfu.ca/~cameron/REX.html

While it's not really counting as a "real" XML parser, it's definitely the best "tag soup descrambler" I've ever seen, and it's very fast and lightweight.

AUTHOR

Robert D. Cameron, cameron (at) sfu (dot) ca is the author of this incredible regular expression, which I have used throughout the years.

I, Jean-Michel Hiver jhiver (at) gmail (dot) com, turned it into a CPAN module because I found myself using this nifty hack more and more, and I thought it would be nicer to have this code in one place to avoid cut and paste.

This module is free software and is distributed under the same license as Perl itself, with however a small constraint:

    # Copyright (c) 1998, Robert D. Cameron. 
    # The following code may be freely used and distributed provided that
    # this copyright and citation notice remains intact and that modifications
    # or additions are clearly identified.

Thus, here's my documented changes:

made the code compliant with use strict; pragma
added POD documentation