Ugo Cei wrote:

Il giorno 21/gen/05, alle 08:41, Marc Salvetti ha scritto:

i was just wondering if there is some technique to use xpath from flowscript to retrieve a part of a dom ?
something like


doc = someObject.xpath("path/to/somewhere", mainDoc);

it would be quite handy instead of using the dom api :)


You can use any one of the various XPath libraries that are out there. Personally, I use JXPath and it works fine for my needs.

Ugo

One thing to watch out for with JXPath is that versions prior to 1.2 (Cocoon 2.1.5 used JXPath 1.1) don't handle namespaces correctly. The expressions match against the namespace prefix, rather than resolving it to the namespace URI and matching on that. As long as you're aware of that limitation though, or use a later version of JXPath, JXPath is great.


Vil.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to