chocolateboy#!/usr/bin/perl -w use strict; use XML::Parser; use Hook::LexWrap; wrap XML::Parser::Tree::Char, pre => sub { # pre-empt Tree's Char handler unless # string is nonblank $_[-1] = 1 unless ($_[1] =~ /\S/); }; my $xml = $ARGV[0] || die "usage: mytree.pl file.xml"; my $parser = XML::Parser->new(Style => 'Tree'); my $tree = $parser->parsefile($xml);
In reply to Re: XML::Parser and white spaces
by Anonymous Monk
in thread XML::Parser and white spaces
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |