Hi Tony,
I dl'ed and installed the jdom stuff, unzipped it and copyed the 4 jar
files into the ...\lib\ext (the ext folder did not exist before).
Bit I still get the message:
--------------------------
G:\E3-Personal-files\Mette\Rexx>xmltest.rex
/// Java-exception (RexxAndJava) occurred:
[method invocation failed: java.lang.reflect.InvocationTargetException
target exception: java.lang.ClassNotFoundException: org.jdom.Document]
\\\
Exception in thread "main" org.apache.bsf.BSFException: "invoke":
object 'Class.class' - method [forName], method not found or error
(exception) execu
ting method!
at
org.rexxla.bsf.engines.rexx.RexxAndJava.javaCallBSF(RexxAndJava.java:2289)
699 *-* call BSF "invoke", "Class.class", "FORNAME" , a.1
49 *-* .bsf~bsf.import("org.jdom.Document","Document")
Error 40 running G:\E3-Personal-files\Mette\Rexx\xmltest.rex line 49:
Incorrect call to routine
Error 40.1: External routine "BSF" failed
--------------------------------
Not knowing java apart from the ifs and elses :-) - can you give me a
hint of what is wring?
regards
Mette
Post by ronyPost by m***@hotmail.comCan anyone supply me with a solution for reading XML files?
I have tried to read about it, found rexxxml by Patrick McPhee, but I
dont know what to do about that libxml, libxlt stuff.
I am running on an Win/XP system, with ooRexx 3 - running Java 5.
Any hints?
Well, you could use the extension to Rexx and ooRexx called BSF4Rexx (an external Rexx function
library), which enables you to directly use Java classes from Rexx.
The BSF4Rexx technology is explained (with an XML processing example) in the work of
Görlich, Realfsen, Spanberger: BSF4Rexx and OpenOffice.org - Nutshell-Examples
<http://wi.wu-wien.ac.at/rgf/diplomarbeiten/Seminararbeiten/2006s_wu/20060628_BSF4RexxSnippets_version_4.pdf>
<http://wi.wu-wien.ac.at/rgf/diplomarbeiten/Seminararbeiten/2006s_wu/20060628_BSF4RexxSnippets_code.zip>
This work has numerous examples using "plain" Java class libraries (e.g. reading/writing MP3 tags,
but also text-2-speech, using JDOM to process XML fiels, scripting OpenOffice, etc.)
It is "brand"-new (just available via the net since a few minutes).
It makes good reading also for people generally interested in the possibilities of combining a
scripting language with Java.
Hope that helps,
---rony