Solved

SAX Parser and DTD

Posted on 2001-07-01
4
339 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
  • 2
4 Comments
 

Accepted Solution

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now