Consultancy Services jobs Etisalat CEO ZANTEL
etisalat

Custom Search
Share/Save/Bookmark Subscribe

Java XML part 3

Posted by Anonymous | 6:36 PM | | 0 comments »

Java XML

Etisalat

DEVELOPER

bangalore

india

BLOGGER

SEX





Setting up the environment for XML and Java:

To use XML you will need a XML parser but before downloading a XML parser, you must make sure you have Java (JDK).Setting up JavaDownload JDK 1.3 from the following URL:
http://java.sun.com/j2se/1.3/
For Windows, the complete download is about 30 MB.Run through the setup.
One of the main problems new Java developers have is setting the PATH and CLASSPATH.

For Windows 95/98/ME you edit the AUTOEXEC.BAT file with the new PATH and CLASSPATH settings and reboot your machine.

For Windows NT/2000 you edit the environment settings.
Both of these changes are described in the Java installation instructions.Setting up XML

This tutorial will use the Xerces XML parser found on the Apache XML site.

1. Download the latest version of Xerces from the following URL:

http://xml.apache.org/dist/xerces-j/

If you are a Windows user, the following is the current download (at the time of writing - Xerces-J 1.4.0), you will need:

http://xml.apache.org/dist/xerces-j/Xerces-J-bin.1.4.3.zip

This tutorial assumes you copied the file to the c:\

2. Extract the contents of the zip and this will copy the files and create all the subdirectories. If you go to your Xerces-J 1.4.3 directory you should see xerces.jar and xercesSamples.jar

The next step is to edit the CLASSPATH in your AUTOEXEC.BAT file.
You need to tell Java where it can find xerces.jar and xercesSamples.jar.
Add the two files to your CLASSPATH.

For example,
set CLASSPATH=%CLASSPATH%;C:\Xerces-J-bin.1.4.3\xerces-1_4_3\ xerces.jar; C:\Xerces-J-bin.1.4.3\xerces-1_4_3\ xercesSamples.jar

In order to test your install, try one of the included samples, SAXCount.

Go to the directory of you have the two jar files, for example:

CD C:\Xerces-J-bin.1.4.3\xerces-1_4_3

(USEFUL TIP - in Windows 98/ME/2000 and NT you can drag and drop a directory into a command prompt window. This saves you from having to type in long directory names.)

Type the following to execute the SAXCount application:

java sax.SAXCount data/personal.xml

You should get the output of the application.

data/personal.xml: 280 ms (37 elems, 18 attrs, 140 spaces, 128 chars)

This is a breakdown of the personal.xml file in the data directory.

If you do not get this output then you are either in the wrong directory or most probably your CLASSPATH is incorrect.
Check your AUTOEXEC.BAT file (Windows 95/98/ME) or your environment settings.

If this is all working, then you have correctly setup the environment for Java and XML.

Well Done

0 comments

free counters
Your Ad Here

Cross Rates Powered by Forex Pros - The Forex Trading Portal.
java.sun.com jobs etisalat actress hot sex
Bangalore, 04 March 2008, UAE Telecoms Gaint founds ‘technologia’ in Bangalore to create continuous stream of new innovations. Affordable Website Design
Free Search Engine Submission
Free Search Engine Submission
Submit Your Site To The Web's Top 50 Search Engines for Free! BigDirectory.org - free url submission, online website directory National Directory Free Web Directory Submission - Dotster Directory Link Popularity Building
We offers advanced Link Popularity Services for small to large static, dynamic and eCommerce websites.
http://www.links-builder.com
India Search Engine and Web Directory Superblog Directory
HOT SEX,NUDE TECHNOLOGIAWORLD SQL JAVA SUN BEA IBM HCL SATYAM TCS CHIRANJEEVI CHIRU PAWAN HANSIKA SANGAVI SNEHA TAMIL SEX MALLU MASALA