• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Way to use the Java functions in Custom Tool

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am creating a tool that reads the XML document and process as per the instructions in XML and parses it.
In the XML document there is a tag where I can have something like this.
<transform>
area = area.toUpperCase();
location = location.substring(5);
</transform>

Like this I would like to use the Java functions.

Wondering how this can be achieved.

Thanks,
Mahesh
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could take a look at XQJ (XQuery) implementations and their custom function capabilities.
DataDirect XQuery for instance.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mahesh Pinnamaneni wrote:In the XML document there is a tag where I can have something like this.
<transform>
area = area.toUpperCase();
location = location.substring(5);
</transform>

Like this I would like to use the Java functions.

Wondering how this can be achieved.



If you are using Java 6, one possibility is to use the Java Scripting API. By default, the API has Javascript installed, which looks very much like Java...

If you absolutely need to have Java, then there are about 2 dozen or so, other scripting engines that you can download and install, for this API -- a couple of them implement Java. See this page (https://scripting.dev.java.net/) for details.

Henry
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic