I am looking for a common-lisp impl if possible. (Also, I dont want to convert sexp to XML and use xpath on the result.)
XPath uses path expressions to select nodes or node-sets in an XML document. These path expressions look very much like the expressions you see when you work with a traditional computer file system. XPath expressions can be used in JavaScript, Java, XML Schema, PHP, Python, C and C++, and lots of other languages.
In XPath, there are seven kinds of nodes: element, attribute, text, namespace, processing-instruction, comment, and document nodes.
In GeneralThere is no standard interpretation of xpath="1" in HTML because there is no standard xpath attribute on a select element (or any other HTML element).
XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document.
a bit late answer, but it seems http://www.cliki.net/spath is exactly what you look for.
Have you looked at SSAX+SXML+SXPATH? It's Scheme rather than Common Lisp but that shouldn't hold you up for long.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With