diff --git a/doc/index.xml b/doc/index.xml index bf03985..8823f09 100644 --- a/doc/index.xml +++ b/doc/index.xml @@ -48,10 +48,12 @@ Plexippus: XPath 1.0 +
+
+ Note that the navigator object caches parts of the document + structure, so when re-using a navigator across XPath evalutions, + make sure not to modify the list structure. +
++ Example: +
+CL-USER> (defparameter *test-document* + (cxml:parse + "<foo a='b'> + <a id='1'/> <b id='2'/> <c id='3'/> + <a id='4'/> <b id='5'/> <c id='6'/> + <a id='7'/> <b id='8'/> <c id='9'/> + <last/> + </foo>" + (cxml-xmls:make-xmls-builder))) +*TEST-DOCUMENT*+
CL-USER> (let ((xpath:*navigator* (cxml-xmls:make-xpath-navigator)))
+ (xpath:evaluate "//c[position()=2]|//a[@id='1']"
+ *test-document*))
+#<XPATH:NODE-SET (a ((id 1))), ... {27C751F1}>
+CL-USER> (xpath:all-nodes *)
+(("a" (("id" "1"))) ("c" (("id" "6"))))