Really its not very hard to write the equivalent of xpath_of(), given the DOM.  
Its probably 20 lines of code or so.  Anyone have this laying about already :)

john

-----Original Message-----
From: Ramon F Herrera [mailto:[email protected]] 
Sent: Monday, April 12, 2010 5:54 PM
To: [email protected]
Cc: [email protected]
Subject: Looking for a simple, XPath-like way to retrieve values from XML files


Hello,

My current application runs on C++ and has many lines like this:


    Variable["user"]        = xpath_of("//root/creator/user");
    Variable["project"]     = xpath_of("//root/creator/project");
    Variable["projectpath"] = xpath_of("//root/creator/projectpath");
    Variable["title"]       = xpath_of("//root/creator/title");
    Variable["notes"]       = xpath_of("//root/creator/notes");

The LHS is a Map, and the RHS is an XQilla function.

http://xqilla.sourceforge.net

Everything is working fine, but it seems that I will have to port the 
application to Java. I don't expect to have any problem going from 
Xerces-C to Xerces-J.

I need a simple retrieval function, though. Xerces programming is more 
or less equivalent to assembly language.

Can you folks recommend some XPath -or equivalent- implementation that 
runs on Java?

TIA,

-Ramon



Reply via email to