This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes How to migrate the code from Crimson to Xerces? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to migrate the code from Crimson to Xerces?" Watch "How to migrate the code from Crimson to Xerces?" New topic
Author

How to migrate the code from Crimson to Xerces?

satya kiran
Ranch Hand

Joined: Nov 07, 2000
Posts: 52
Hi,
I am parsing the xml document (SAX Parse) and using crimson.jar with jaxp. I am seeing the performance problems on AIX 4.3. I want to use xerces 2.5 instead of crimson. Could you please let me know what changes i need to make in the source code to use the xerces.
I read an article saying that xerces is faster in AIX machine JVM's where as crimson efficient in Sun Machines.
Thanks in advance for your help.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
If you're already using JAXP (your code is not importing anything Xerces-specific), there is no code changes required to switch to using Xerces under the hood -- just set the "javax.xml.parsers.DocumentBuilderFactory" system property to point to the Xerces implementation of that particular interface (or "javax.xml.parsers.SAXParserFactory" for SAX).


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
Don't get me started about those stupid light bulbs.
 
subject: How to migrate the code from Crimson to Xerces?