From: Marc P. <ma...@an...> - 2003-04-04 22:32:53
|
Hi all, Does anyone know of a good (i.e. simple and small) XPath implementation that can work with regular W3C DOM nodes? I would like to add at least something like XPath to our XML helper for WM templates, to make node selection a bit less boring in WM script. XSLT processors have XPath implemented but we only want the XPath bit... and effectively we just want: public NodeList evaluateXPathExpression( Node context, String expression) ...so that in WMscript we can do things like: #set $channels = $XMLHelper.find( "rss/channel") Otherwise we currently have to find the "rss" nodes, then find the "channel" nodes under that etc. - boring and very longwinded if you are looking for something more than one or two levels deep. I notice the XPath part of Apache Xalan-Java is available... but it looks a bit more complicated than what we need/want. I don't want to have to implement 10 interfaces just to get this working if I can avoid it. TIA -- Marc Palmer |