Hi
I am in the process of learing jxpath and I wonder if it is possible to
optimize results.
(I am programming against the mmbase bridge)
http://www.mmbase.org/api/org/mmbase/bridge/Cloud.html
and have this jxpah query
JXPathContext context = JXPathContext.newContext(cloud);
NodeManager nodeManager = (NodeManager) context.getValue("nodeManagers[name =
'news' ]/.");
This of course gets all "nodeManagers" and iterates though the result. Now the
Cloud interface also has a method getNodeManager(String name);
that I called via jxpath
JXPathContext context = JXPathContext.newContext(cloud);
context.getVariables().declareVariable("cloud", cloud);
NodeManager nodeManager
=(NodeManager)context.getValue("getNodeManager($cloud,'news')");
This of course looks to much like java code:)
can sombody tell me is it's possible for jxpath to delegate some "constraints
(like name = "news") to an other class?
my second question:
is there a way I can disable the jxpath feature that enables it to call static
methods? I would like to use jxpah to provice access to mmbase from a remote
location but
JXPathContext context = JXPathContext.newContext(new String());
context.getValue("java.lang.System.exit(1)");
scares me :)
greeting and (for me sleepless nights).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]