SAX Parser and DTD

Posted on 2001-07-01
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

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

take a look at O`Reilly - homepage. In the sampels for the book Java and XML (Download from http://examples.oreilly.com/javaxml/)

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

by:Wayne Bradney
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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

650 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