The situation is as follows:
- I have an XML export of a project;
- I have a working Caché installation (which means I have
cachedb.jar
andcachejdbc.jar
); - I have a namespace/user/pass to work with.
What I want to do is:
- import the XML into this namespace;
- collect the list of classes imported by that XML;
- write the plain source files in a destination directory;
- remove the imported classes after I'm done reading.
I know how to do point 3 (using class %Compiler.UDL.TextServices
); but I have no idea how to do point 1.
Also, it may be that the Caché installation is not on the machine on which I want to do the import.
So, what class can I use to import that XML, and how do I specifically retrieve the classes which I have just imported, and not the others?
EDIT: OK, it appears that what I must use is the LoadStream
method from %System.OBJ
.
Given a Database
object, it means I can run it as a class method using the .runClassMethod()
on this object... Except that I fail to see how to create the stream in the first place. Argh.