The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Helpful XPath API's

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Helpful XPath API's Posted: Aug 1, 2004 2:46 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Helpful XPath API's
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

The XPath package in VisualWorks was made for their XSLT library. They've been doing work on it. I fixed a couple of bugs in it about a year ago now and published them to public store too. I think some of them got accepted, it's hard to tell :)

But today I published a new version to public store that includes an easy to use API for matching nodes in your DOM tree using XPath:

anXMLNode xpathLocate: '//foo/baz[2]/bar/text()'

It's that simple now. As simple as it should be in fact. You can pass it a string or you can pass it a pre-built XPath expression. You can pre-build the XPath expression like so:

'//foo/baz[2]/bar/text()' asXPathLocation

You can also pass in variables for the XPath expression like so:

anXMLNode xpathLocate: myXPathExpression variables: (Dictionary new at: 'foo' put: 'bar'; yourself)

And there you have it. Hopefully this API will be picked up by the Cincom engineering team for the 7.3 release

Read: Helpful XPath API's

Topic: It's not always about Windows Previous Topic   Next Topic Topic: Another Sydney Smalltalk Users Group Account

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use