- or download this
print {$parser->{parameters}[( exists $attr->{':userID'} ? 0 : 1 )]} $
+parser->ToXML( $tag, $attr);
- or download this
print {$parser->{parameters}[( (exists $attr->{':contents'} and exists
+ $attr->{':contents'}{':userID'}) ? 0 : 1 )]} $parser->ToXML( $tag, $
+attr);
- or download this
use strict;
use warnings;
...
</start_element>
</root>
- or download this
my $FH;
if (exists $attr->{':user_id'}) {
...
</code></p>
<p>The other script works differently. In the '^start_element' handler
+ it resets the flag (stored in $parser->{pad} which is an attribute o
+f the parser specificaly "to put anything you want to and access it i
+n any handler"), then if the <userID> tag is encountered the fl
+ag is set and then the 'start_element' handler selects one of the fil
+ehandles passed to <c>$parser->parse()