=head1 NAME XML::TiePYX - Read XML data in PYX format via tied filehandle =head1 SYNOPSIS use XML::TiePYX; tie *XML,'XML::TiePYX','file.xml' open IN,'file.xml' or die $!; tie *XML,'XML::TiePYX',\*IN,Condense=>0; my $text='text'; tie *XML,'XML::TiePYX',\$text,Namespaces=>1; =head1 DESCRIPTION XML::TiePYX lets you read an XML file or string in PYX format from a tied filehandle. PYX is a line-oriented, parsed representation of XML developed by Sean McGrath (http://www.pyxie.org). Each line corresponds to one "event" in the XML, with the first character indicating the type of event: =over 4 =item ( The start of an element; the rest of the line is its name. =item A An attribute; the rest of the line is the attribute's name, a space, and its value. =item ) The end of an element; the rest of the line is its name. =item - Literal text (characters). The rest of the line is the text. =item ? A processing instruction. The rest of the line is the instruction's target, a space, and the instruction's value. =back Newlines in attribute values, text, and processing instruction values are represented as the literal sequence '\n' (that is, a backslash followed by an 'n'). By default, consecutive runs of characters are always gathered into a single text event, but this behavior can be disabled. Comments are *not* available through PYX. Just as SAX is an API well suited to "push"-mode XML parsing, PYX is well- suited to "pull"-mode parsing where you want to capture the state of the parse through your program's flow of code rather than through a bunch of state variables. This module uses incremental parsing to avoid the need to buffer up large numbers of events. This module implements an (unofficial) extension to the PYX format to allow namespace processing. If namespaces are enabled, an element or attribute name will be prefixed by its namespace URI (*NOT* any namespace prefix used in the document) enclosed in curly braces. A name with no namespace will be prefixed with {}. =head1 INTERFACE tie *tied_handle, 'XML::TiePYX', source, [Option=>value,...] I is the filehandle from which the PYX events will be read. I is either a reference to a string containing the XML, the name of a file containing the XML, or an open IO::Handle or filehandle glob reference from which the XML can be read. The I