How
to contact me
Email: zgao (with the domain
: @cs.sunysb.edu)
Office Hours: Tu/Th 4pm --
5pm Rm 2110, CS Building
XMLSpy can be downloaded from http://www.altova.com/. You can choose to download a Professional-Edition, Home-Edition or even Enterprise-Edition (Note that these links are pointing to 2005 version. There are also 2006 versions that you can have a try :-)). Home Edition is free, and it is enough for our project. For other editions, new customers can request a free 30-day evaluation key-code from within the application. You can choose any version if you can use it to finish project-3.
Here are some useful documents: XMLSpy Tutorial (2005 version) in chm format and pdf format, XMLSpy user reference. These documents will be in your XMLSpy installation directory after installing it. You may use them for reference.
1. Download
and install: If you want to download it and install it on your own computer,
stable version of installer is recommended. You can choose any stable version
you want if you can use it to finish project-3. After you download it, simply
click on the jar file icon, or run it with java –jar eXist-1.0b2.jar
(or the snapshot version # if you choose to use, such as java –jar
eXist-snapshot-20060316.jar). After installation, you should be able to
easily access all help documentations on your computer. In
graduate lab 1239, eXist can also be installed in your H drive. Remember to
make sure that you have enough space left before installation.
2. Load XML files and execute Xqueries: have a look at QuickStartGuide and XQueryDocs.Notice that eXist doesn’t support query on document fragments constructed within the XQuery, i.e. a query like the following will fail:
let $x := <test>Test</test> return $x/test.
You have to store the fragment into the database first. Look at ManipulatingDatabaseContents for example. You can use the provided xmldb extension functions for that.
3. Execute Xqueries from java: You can read 3. Writing Java Applications with the XML:DB API in Developer's Guide. Here is an example for querying the database. make sure the query path in your xquery is correct. When running your program, add these jar files to your classpath: ~eXist/exist.jar, and all jar files in ~eXist/lib/core/. (Suppose ~eXist is your eXist installation directory.)
Here is a copy of sample program which have the connection information
to the oraserv. Choose the one you are using. Sample
program for JDBC-THIN Sample
program for JDBC-OCI make sure that you replace your own username
and password when necessary.
Here is a checklist of all CLASSPATH issues that need to be addressed
before running the JDBC program.
1. Use Windows Explorer to see if Oracle's client libraries are available. If you are working in graduate lab 1239, they should be installed in a directory c:\OracleInstantClient, and you should be able to see 2 driver .jar files called "Ojdbc14.jar" and "orai18n.jar". These are your required drivers for connecting. If you are not working in graduate lab 1239 you need to download these two drives following the above direction.
2. Open the DOS command prompt. This is done by typing on the Windows Start Menu -> Run-> and in the text box "cmd". This opens up the command prompt.
3. Type SET command from
the command prompt and check if CLASSPATH is set to the following:
CLASSPATH =.;c:\Oraclient\ojdbc14.jar;c:\Oraclient\orai18n.jar
4. If not, type set CLASSPATH = .;c:\Oraclient\ojdbc14.jar;c:\Oraclient\orai18n.jar.
Remember the "." in the classpath is very important. It directs
you to search in the parent directory. So your program might fail to execute
if it is not set in the classpath.
Also remember if you close the window where you have set the classpath variable you will need to set it again if you want to run your code without errors.
Last updated on April, 2006 by Zhiquan Gao