OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Validation and APIs

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <david@megginson.com>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 21 Jul 1999 08:48:41 -0400 (EDT)

Chris Harris writes:

 > This is not to say that you cannot use a validating parser with SAX, in
 > fact all the major parsers provide such capability. It's quite possible to
 > execute all your business logic during the SAX parse, and then throw it
 > away if the parse fails at the end of the document. 

That's pretty much what happens with (most? all?) DOM implementations
behind the scenes.  Remember that the DOM is just one particular (very
generic) type of object model -- instead of working with invoices, or
inventory items, or what have you, you work with elements, attributes,
and text.  A DOM parser typically builds the tree as it goes, and then
presumably discards it all if there is an error.

In any case, even if a document is valid from the XML perspective, its
contents may still violate your business rules, and you might still
have to throw away everything in the middle of walking through a DOM
tree.


All the best,


David

-- 
David Megginson                 david@megginson.com
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)



  • References:
    • No Subject
      • From: Chris Harris <christopher.harris@reuters.com>



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS