Re: [xml] Validating a Document using the Sax Interface??

On Thu, 2002-05-09 at 15:36, OrangeCrush wrote:

Hello All,

Is there a way to validate xml documet using the SAX interface??  A DTD might be present in the document 
itself or outside in a file.  I tried setting the xmlDoValidityCheckingDefaultValue to 1 but that did not 
work.  I have used the DOM model and the xmlValidateDocument function to validate a document in the past.  
Is there a similar function for SAX model?  It seems like most of the validating functions take a xmlDocPtr 
as an argument but the only way to get the xmlDocPtr is to build a DOM tree.  Is this correct? Any help 
would be greatly appreciated.


I think the answer is that you can't:

"... not a validating parser, so only structural errors will be picked
up. So any validation of the format will have to be done by your parser


John Fleck
jfleck inkstain net (h) jfleck abqjournal com (w)

"You don't want to die with the music still in you."
 - John Gardner

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]