Home

Awesome

XML-XPath

Build Status Coverage Status

Unit Tests Coverage Status

Pharo 7 Pharo 8 Pharo 9 Pharo 10 Pharo 11 Pharo 12 Pharo 13

An XPath library for Pharo leveraging the XML parsing capabilities of XMLParser. Supports XPath 1.0 syntax with extensions.

Installation

Metacello new
	baseline: 'XPath';
	repository: 'github://pharo-contributions/XML-XPath/src';
	load.

Usage

A simple example on how to use the XPath class:

doc := XMLDOMParser parse: aStream.
path := XPath for: 'entry/content/@src'.
urls := path in: doc.

This will look for each 'src' attribute of each 'content' node of all 'entry' nodes in the document.

LICENSE

MIT License

History

This project was migrated from http://smalltalkhub.com/#!/~PharoExtras/XPath