XPath library

XPath library project page

A basic XPath library for Squeak, leveraging the XML parsing capabilities now included in the base image. Modifies XMLNode to better support XPath. Handles basic XPath locator expressions for elements and attributes; returns a collection of XMLNodes matching the expression, if any.


Usage:
| doc results |
doc := XMLDOMParser parseDocumentFromFileNamed: 'Data\supplementalData.xml'.
results := ( XPath for: '/languageData/language/@type' ) in: doc.
results explore

XPath-hfm.9.mcz
XPath-hfm.8.mcz
XPath-hfm.7.mcz
XPath-hfm.6.mcz
XPath-hfm.5.mcz
XPath-hfm.4.mcz
XPath-PH.3.mcz