j.goor has asked for the wisdom of the Perl Monks concerning the following question:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" versi +on="1.0"> <xsl:output method="xml" indent="yes" encoding="utf-8"/> <xsl:param name='test'>testdata</xsl:param> <xsl:template match="/"> <TAG> <SOME_DATA> </SOME_DATA> </TAG> </xsl:template> </xsl:stylesheet>
#perl; # INIT ---- use warnings; use strict; use Win32::OLE qw(in with); my $obj_xslt = Win32::OLE->new('MSXML2.DOMDocument.4.0') or die "new() + failed creating DOM"; $obj_xslt->{async} = "False"; $obj_xslt->load('<the_xslt_as_mentioned_above>'); # Get parameters from xslt my $xpath = "//xsl:param[\@name='test']"; my $q = $obj_xslt->selectSingleNode($xpath); print $q->item(0)->nodeValue, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange XML parser behaviour using MSXML2 Version 4.0 or not...?
by gellyfish (Monsignor) on Mar 16, 2005 at 10:19 UTC | |
by j.goor (Acolyte) on Mar 16, 2005 at 10:57 UTC | |
by gellyfish (Monsignor) on Mar 16, 2005 at 11:11 UTC | |
|
Re: Strange XML parser behaviour using MSXML2 Version 4.0 or not...?
by perlsen (Chaplain) on Mar 16, 2005 at 10:49 UTC | |
by mirod (Canon) on Mar 16, 2005 at 11:18 UTC |