OneStopFAQs.com - World's Largest Collection of Frequently Asked Questions
Thursday, August 28, 2014 Home| Ask Questions| About Us| Feedback| Contact Us|
 Common FAQs  
 Our Services  
FAQs PROGRAMMING LANGUAGES XML DOM DETAILS
A D V E R T I S E M E N T


Question :
Can I use a Generic SAX/DOM XML parser for Tomcat instead of parser.jar? I tried using Xerces and get class not found errors for sun.xxxx parser during Tomcat initialization.
Category XML DOM Interview Questions
Rating (0.3) By 6 users
Added on 4/27/2009
Views 186
Rate it!
Answers:

Try to configure Xerces as customized SAX/DOM implementation by system properties. By default jaxp uses com.sun.xml.parser.DocumentBuilderFactoryImpl and com.sun.xml.parser.SAXParserFactoryImpl (this is why you get ClassNotFoundException if you miss parser.jar from the classpath).

Example:


System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");



If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in OneStopFAQs.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    How to convert a DOM Document object into an XML file using JAXP?
    View Answer
    I want to parse an XML file stored on a remote server. Can I use the DOM for the same without downloading the file?
    View Answer
    Is there some API using which I can modify a very large XML file? DOM goes out of memory and SAX just doesn't fit the bill.
    View Answer
    I have to build an XML document from pieces of existing ones, and then output it as a string. What libraries should I use?
    View Answer
    How do I write a DOM document as an XML file?
    View Answer
    Does DOM include APIs for diffing and merging XML documents?
    View Answer
    How can I map a DOM tree to javax.swing.tree.TreeNode or some object so that I can view an XML document as JTree?
    View Answer
    Where can I get an XML parser/DOM implementation that allows me to programmatically query the DTD?
    View Answer
    I am working on the data communication between two applications. I am using an XML file that is generated dynamically in one application and sending it to the other through RMI. On the other end I want to parse the XML document object to get the information in that object. In this process, if I use SAX, it is giving exception that document should contain root element. But if I use the same document object with DOM API it is working properly. Where is the problem? How can I use SAX API to parse where I have only a Document object, but not the physical XML file stored on the disk?
    View Answer
    Where can I get basic information about XML? Are there any good tutorials?
    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL XML DOM Interview Questions


    Sponsors  

    Google Search

    Google
    Business FAQs, Internet FAQs, Accounts FAQs, Computer FAQs, Insurance FAQs, Frequently Asked Questions & Related Pages


    Arts and Entertainment Frequently Asked Questions | Business Frequently Asked Questions | Computers Frequently Asked Questions | Programming Languages Frequently Asked Questions | Education Frequently Asked Questions | Electronic gadgets Frequently Asked Questions | Health Frequently Asked Questions | People and Relationships Frequently Asked Questions | Food and Cooking Frequently Asked Questions | History Politics and Society Frequently Asked Questions | Home, Farm and Garden Frequently Asked Questions | Insurance Frequently Asked Questions | Jobs & Careers Frequently Asked Questions | Law and Legal Issues Frequently Asked Questions | Money and Credit Frequently Asked Questions | Science and Technology Frequently Asked Questions | Religion and Spirituality Frequently Asked Questions | Shopping Frequently Asked Questions | Sports Frequently Asked Questions | Travels Frequently Asked Questions | Animal Life Frequently Asked Questions | Literature and Language Frequently Asked Questions | Vehicles Frequently Asked Questions | Plants and Trees Frequently Asked Questions | Miscellaneous Frequently Asked Questions | Software Testing Frequently Asked Questions | Electronics Frequently Asked Questions | Certification Frequently Asked Questions | Web Hosting Frequently Asked Questions | SAP Module Frequently Asked Questions | Database Frequently Asked Questions | Operating System Frequently Asked Questions | Soft Skills Frequently Asked Questions | Hobbies and Collectibles Frequently Asked Questions | Humour and Amusement Corner Frequently Asked Questions | Community life and Leisure Frequently Asked Questions | Street Care and Cleaning Frequently Asked Questions | Technology Frequently Asked Questions | Celebrities Frequently Asked Questions | India Information Frequently Asked Questions | Microsoft Frequently Asked Questions | Multimedia Frequently Asked Questions |
    Copyright © 2005-2014. One Stop FAQs.com. All rights reserved Privacy Policy | Terms and Conditions | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Cool Interview | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Freshers & Experienced Jobs | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting in India | Free SMS | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Free Online Exam | The Galz | Fun & Entertainment | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    Page URL: http://www.onestopfaqs.com/faqs/23381/Default.asp
    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Greetings