in reply to Strange XML parser behaviour using MSXML2 Version 4.0 or not...?

Hi, I just tried your input xslt is an input file and tried using xml::Twig module
i got the output. Is this your requirement?. if not i will give better result next time.

use XML::Twig; my $twig = new XML::Twig( TwigRoots => { 'xsl:param[@name=\'test\']' = +> \&output }); $twig->parsefile( shift @ARGV ); sub output { my( $tree, $elem ) = @_; print $elem->text, "\n"; } OUTPUT: testdata
  • Comment on Re: Strange XML parser behaviour using MSXML2 Version 4.0 or not...?
  • Download Code

Replies are listed 'Best First'.
Re^2: Strange XML parser behaviour using MSXML2 Version 4.0 or not...?
by mirod (Canon) on Mar 16, 2005 at 11:18 UTC

    If you have XML::Twig installed, note that you can use the xml_grep that comes with it:

    xml_grep -t 'xsl:param[@name="test"]' file.xslt

    The -t option is for text output (no tags around the result(s)), the rest should be pretty self-explanatory.

    Probably not of much help for the OP though...