'Your DOM script should then decide what to do with unnecessary whitespaces. You can use a PerlSAX filter (like XML::Handler::DetectWS) to filter out the whitespace at parse time, before it reaches the DOM document.'
i was wondering if someone could explain how to implement this in the context of parsing a document with XML::DOM, i.e.:
my $parser = new XML::DOM::Parser;
my $doc = $parser->parsefile ("myfile.xml");it's not that big of a thing to deal with the whitespace nodes with code, but it gets a little tiresome. i wrote a sub that would strip all of these nodes from the $doc tree, but was wondering how the above-mentioned filter solution worked.
thanks, stephen
i know, i know: 'buy the green monkey book.' it's ordered but i don't have it yet.
