Thread Fehler bei XPath-Ausdruck (6 answers)
Opened by Nordlicht at 2010-10-16 06:34

FIFO
 2010-10-16 08:20
#141979 #141979
User since
2005-06-01
469 Artikel
BenutzerIn

user image
Muss im XPath-Ausdruck nicht die Attributabfrage in eckige Klammern?
Außerdem wird $path nicht interpoliert in single quotes.
Code (perl): (dl )
my @nodes = $index->findnodes("/index/file/[\@src=$path]");

Das XPath-Tutorial kennst Du wahrscheinlich.

Gruß FIFO

edit: typo, @src escaped
Last edited: 2010-10-16 08:31:26 +0200 (CEST)
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"

View full thread Fehler bei XPath-Ausdruck