[xml] xpath and libxml2

Hi, I'm new to libxml2 and I'm trying to use it but am running into some
problems. I tried to make a simple little program that just reads in a
file and parses it and then does an xpath expression on it and gets the
results. This code is based on the tutorial code and is pretty simple,
but my problem is that no matter what I give it it doesn't get any
results for the xpath expressions. So I looked into it and tried to use
xmllint to see if it was a problem with my xpath expressions, but using
the same xpath expressions I can't seem to get any results. The xml file
can be obtained here:

and I tried expressions like "//Placemark", "/kml" and tons of other
stuff but they all just give me the response "Object is a node set: Set
contains 0 nodes"... I've tried it with other xml documents and they
seem to work as I'd expect, but for some reason I can't seem to get this
one to work... I also tried the document on this site that I found (
http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm )
using the same expressions and it worked fine there...

Can anyone help me? It would be greatly appreciated.


p.s. I'm sorry, I'm not sure if this is the right place to send messages
about this, but I'm kind of stuck, and didn't know where to turn to.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]