Solved

SAX Parser and DTD

Posted on 2001-07-01
4
327 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
Comment Utility
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
Comment Utility
ruff_ryder,

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

Regards,
WMB
0
 
LVL 3

Author Comment

by:ruff_ryder
Comment Utility
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
Comment Utility
thanx ;-)

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

choli
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

17 Experts available now in Live!

Get 1:1 Help Now