Hi people,
scanned the mailing-lists but couldnīt find out how to use variables in
an Xpath-object which is used repeatedly:
For example:
    XPath xpGet = new XPath(
"/preferences/node[@name=$name]/map/entry[@key=$key]/value" );

Would this work:?
SimpleVariableContext svc = new SimpleVariableContext();
svc.setVariableValue( "$name", "system" );
svc.setVariableValue( "$key", "mahnungsintervall" );

String res = (String)xpGet.evaluate( svc );

TIA for any help.
Mark



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to