Yes, GSXPathContext has been/is being used succesfully in production systems.
:-)
Here is a trivial example which I just made up:
<test>
<item>
<description>This is an item</description>
<number>1</number>
</item>
<item>
<description>This is another item</description>
<number>2</number>
</item>
</test>
Here are a few demo XPath queries (tested with gnustep-base 1.14.0 + libxml
2.6.16):
'string(/test/item[1]/description/text())' returns the GSXPathString 'This is
an item'
'string(/test/item[2]/description/text())' returns the GSXPathString 'This is
another item'
'//number' returns a GSXPathNodeSet containing two XML_ELEMENT_NODEs, for the
two
tags <number>
You can find lot more examples on the web. It's a very nice tool to quickly
extract
a piece of information from an XML file. :-)
Thanks
-----Original Message-----
From: Philippe Roussel <[EMAIL PROTECTED]>
Sent: Thursday, January 3, 2008 3:37pm
To: [email protected]
Subject: GSXPathContext examples ?
Hi all,
I know that GSXPathContext's documentation says I just have to learn
xpath syntax but I would like to know if someone uses GSXPathContext
and its friends successfully.
Any example (xml file and xpath query) verified to work with GNUstep
would be great.
Thanks,
Philippe
--
Il est temps pour la race humaine d'entrer dans le système solaire. Dan Quayle
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep