There are millions of Frameworks based on Java. Jabaco is based on Java too - so it is very simple to use every Java-Library with Jabaco. You could use Frameworks like Hibernate, Java3D, eFace, ... Let's go.
I'll show you how to use the Java XML-Lib in this sample. I have googled for Java XML and found javax.xml.parsers.DocumentBuilderFactory. That sounds good and so i have a looked at http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/DocumentBuilderFactory.html
Ok, this Class is abstract and has a static method "newInstance()". There are some syntax differences between Java an Jabaco. For Jabaco you have to replace the "." with an "#" in the namespace.
' Create a new Factory-Instance: Dim tmpFactory As javax#xml#parsers#DocumentBuilderFactory tmpFactory = javax#xml#parsers#DocumentBuilderFactory.newInstance()
And the Java-version:
// Create a new Factory-Instance: javax.xml.parsers.DocumentBuilderFactory tmpFactory; tmpFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
Now we should have a new Instance of the document factory and could create a DocumentBuilder (http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/DocumentBuilder.html). There is the next interesting method "parse()" which returns a instance that is compatible to the "org.w3c.dom.document"-interface (http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html). That's what we want:
' Create a new Factory-Instance Dim tmpFactory As javax#xml#parsers#DocumentBuilderFactory tmpFactory = javax#xml#parsers#DocumentBuilderFactory.newInstance() ' Create a new Document Dim tmpDocument As org#w3c#dom#Document tmpDocument = tmpFactory.newDocumentBuilder().parse("c:\test.xml")
That's all you need to instance a Java-Class inside Jabaco. Now you can use it:
' Create a new Factory-Instance Dim tmpFactory As javax#xml#parsers#DocumentBuilderFactory tmpFactory = javax#xml#parsers#DocumentBuilderFactory.newInstance() ' Create a new Document Dim tmpDocument As org#w3c#dom#Document tmpDocument = tmpFactory.newDocumentBuilder().parse("c:\test.xml") ' Get TagName from Document MsgBox tmpDocument.getDocumentElement().getTagName
