?
Solved

SAX Parser and DTD

Posted on 2001-07-01
4
Medium Priority
?
379 Views
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?
0
Comment
Question by:ruff_ryder
[X]
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
4 Comments
 

Accepted Solution

by:
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.

choli
0
 
LVL 6

Expert Comment

by:Wayne Bradney
ID: 6245146
ruff_ryder,

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

Regards,
WMB
0
 
LVL 3

Author Comment

by:ruff_ryder
ID: 6245261
Thanks guys, fixed it. Used:

parser->setExitOnFirstFatalError(false);

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 ...
0
 

Expert Comment

by:Choli100298
ID: 6245436
thanx ;-)

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

choli
0

Featured Post

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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 look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

770 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