Leser: 15
error : xmlXPathCompiledEval: 1 objects left on the stack.
1
2
3
4
5
6
my ($index) = $index_file->findnodes('/index');
...
unless ($index->exists('/index/file/@src = $path'))
{
...
}
QuoteA VariableReference evaluates to the value to which the variable name is bound in the set of variable bindings in the context. It is an error if the variable name is not bound to any value in the set of variable bindings in the expression context.
1
2
3
4
5
6
7
8
9
10
my ($index) = $index_file->findnodes('/index');
if ($index->exists('/index/path/@src'))
{
my ($p) = $index->findnodes('/index/path/@src');
if ($p->value eq $path)
{
print "So funktioniert es!";
}
}
my @nodes = $index->findnodes("/index/file/[\@src=$path]");