Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

October 28, 2005

Chilkat XML and the validation question

Question:

It seems the XML component is very nice when parsing. I tried very hard to raise an error, but it seems it automatically ends missing or miswritten ending tags. Thus making me think that an XML file full of mistakes is well formated. To go around this problem, I use the MSXML library provided by Microsoft to validate my XML files. But I found it very slow and uneasy to use. Is there a way to precisely validate an XML source with the Chilkat component (I mean
by that retrieving an error, when a tag is not well formed, or when an iso-8859-1 character is used in an utf-8 encoded XML file, for example).

Answer:

Good question. Years ago, the original need that prompted me to develop the XML parser was that the Microsoft XML parser was *very* slow in parsing very large XML files (files that were many megabytes in size with many nodes, i.e. lots of little pieces of data). The MS XML parser has since greatly improved in parsing speed, and this is no longer a factor. In fact, I wouldn’t doubt it if MS XML parses faster than Chilkat now. If you see a claim on some download site about Chilkat XML being a super-fast parser, you’re looking at something that is quite old.

Two other factors prompted me to develop Chilkat XML: (1) I hated the API presented by MS XML and all other existing XML parsers. I wanted an API that was convenient for manipulating structured data (not marked-up text) that is fairly simple in structure. I know about XPATH and XSLT and all that other stuff, but frankly, for 90% of all XML tasks it’s not necessary and overcomplicated. (2) It drove me crazy when I had to work with large XML files received from other sources with errors. Finding the error was very difficult. (Remember, this was a number of years back when there weren’t nearly so many XML tools available.) The Chilkat XML parser was made non-validating on purpose.

So to answer the questions: Chilkat XML will continue to be a non-validating parser because that is how it was originally architected. You’ll have to use MS XML to validate. However, if you want to check for charset issues, you could use the Chilkat Charset component to do it. It provides VerifyData and VerifyFile methods.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.