How is the Apache XML Project related to java and JAXP. JAXP bundles the Xalan package, which i believe is from Apache. Out of the various packages available which is the most suitable in terms of ease of use and performance? ----------- Amit
Kalpesh Soni
Ranch Hand
Joined: Jan 02, 2001
Posts: 306
posted
0
and please tell if somebody knows whether xerces can work with jaxp or not ? if yes how ------------------ "Sun Certified Java Programmer" KS "Failing to plan is like plannig to fail!"
Test 094, IBM WID 6.0 cert
SCJP 1.2
SCBCD 1.3 Beta
SCWCD 1.4 Beta
SCMAD Beta
SCDJWS Beta
KS
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5781
posted
0
Since all the major software vendors supply their own XML parsers these days it was becoming hard for programmers to test their code with various different parsers. Even though all the parsers are written in compliance with W3C spec, instantiating and loading an instance of a particular parser required changing the Java code. Sun Microsystems came to the rescue and wrote a convenience framework called JAXP to alleviate the pains associated with parser switching exercise. JAXP ( Java API for XML Parsing ) is a lightweight framework provided by Sun that allows you to plug-in any XML parser with your Java applications. It is important to note, JAXP is not an XML parser. The XML initiative from Apache has produced Xerces which is an XML parser. Xalan is the XSL Tranformation engine( not a parser! ) that is also a product of Apache. Sun has its own XML parser called Crimson that is bundled with the JAXP download. Once you download JAXP you can use any parser in your Java programs by tweaking the System Properties. Hope that clarifies your doubts.
------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Master IT Architect.
Sun Certified Architect(SCEA).
Amit Agarwal
Ranch Hand
Joined: May 09, 2001
Posts: 92
posted
0
Hi Ajith, Your reply was very informative. But, you missed to throw light on one aspect. i.e. which is a better parser in terms of ease of use and performance. (Crimson / Xerses) Also, if i want to use Xerses can i simply replace the Crimson jar file with the one of Xerses and change the clsspath or there is something more i need to do? Will there be any change / recompile required in the code? Regards, Amit
Ashwin Asani
Greenhorn
Joined: Jun 14, 2001
Posts: 6
posted
0
Hi Amit, Why don't you try using Oracle XML Parser. It's one of the best I've found. In fact Oracle comes with XSQL Servlet that is extremely easy for generating XML documents from RDBMS and also applying XSL to the same to give an HTML output. Check out this site for more details: http://otn.oracle.com/tech/xml/
Anil Vupputuri
Ranch Hand
Joined: Oct 31, 2000
Posts: 527
posted
0
Originally posted by Amit Agarwal: Your reply was very informative. But, you missed to throw light on one aspect. i.e. which is a better parser in terms of ease of use and performance. (Crimson / Xerses) Also, if i want to use Xerses can i simply replace the Crimson jar file with the one of Xerses and change the clsspath or there is something more i need to do? Will there be any change / recompile required in the code?
For replacing Crimson with Xerces, u obviously need to change code with new import package names.
If you are using JAXP, you can simply tweak the System.properties file. That will do the magic.
Amit Agarwal
Ranch Hand
Joined: May 09, 2001
Posts: 92
posted
0
Hi Ajith, What do you mean by tweaking the System.properties file and where is this file located? Regards, Amit [This message has been edited by Amit Agarwal (edited June 20, 2001).]
Anil Vupputuri
Ranch Hand
Joined: Oct 31, 2000
Posts: 527
posted
0
If you are using JAXP, you can simply tweak the System.properties file. That will do the magic.
U mean, do we need to set name of the parser in the properties file, but I never found any properties file. can u light on this... Thx. Anil