Hi,
I get the following XML:
<config>
<version general="1.2.3">
<subtype type="a" version="1.2" />
<subtype type="b" version="3.6" />
...
</version>
...
</config>
I have some code in Perl to get the config node from a database.
After I get it, if I try the follwoing:
my $elem = $cfg->getElementsByTagName("version");
my $generalVer = $elem ? $elem->get_node(1)->getAttribute("general") : undef;
all is working fine, $generalVer
contains 1.2.3
, as exected.
But if I try this:
my $elem = $cfg->getElementsByTagName("version/subtype[@type='a']");
my $aVersion = $elem ? $elem->get_node(1)->getAttribute("version") : undef;
it fails with the message "Invalid predicate".
What can be the problem?