SAX Parser and DTD

Posted on 2001-07-01
Last Modified: 2013-11-19
Hello all, I'm using Apache's Xerces-C 1.4 to write a validating parser for my app. The validation works, but my prob is that if the xml file is not in valid format the parser stops at the very first invalid section.

I want to collect all the invalid points in the XML document and report them at the end of the parse of the entire document!

Any hints?
Question by:ruff_ryder
  • 2

Accepted Solution

Choli100298 earned 100 total points
ID: 6243866
Maybe, yes....

take a look at O`Reilly - homepage. In the sampels for the book Java and XML (Download from

they show how to implement an own error-handler (chapter 3 or so....). With this sample, you should be able to handle your problem.


Expert Comment

ID: 6245146

The parser should report all errors. What is your handler doing?


Author Comment

ID: 6245261
Thanks guys, fixed it. Used:


wbrandey, my Handler implements the ErrorHandler and DocumentHandler interfaces. What I want to do is to create a report of the parse process and see what it encountered during the parse so I'm capturing all errors and examining the elements for attributes and stuff ...

Choli, the points are yours ...

Expert Comment

ID: 6245436
thanx ;-)

first expert points in my life.... I'll keep you in mind 4 all my life... ;-)


Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Specific format 21 206
any soltion create a connection to import XML file from website 4 51
XML to Excel using XSL - formatting 3 37
Help with Syntax 9 44
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question