On 10/23/2012 02:12 PM, Yves Forkl wrote: > Within a macro command, I need to percent-encode (URI encode) the contents of > a string before including it in a call to a Web service. > > Is there any chance of being able to use Java's URLEncoder.encode(String, > String) method or one of XXE's java classes for this purpose in a macro? Or > by writing a Java class of one's own? >
In a macro-command, you can use XPath 1.0 expressions in get, set, test, match elements. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/macro.html The native implementation of XPath 1.0 used by XXE can invoke Java static methods. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpathextfunc_java.html Therefore, you can easily invoke URLEncoder.encode(String, String) from a macro-command without having to write any Java code. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

