I'm working on a new project and have a need to parse XML Schemas found inside WSDL documents. After a few google searches I discovered the concept of a Schema Object Model (SOM). The .NET Framework has a SOM parser as does MSXML. There's also a SOM parser for Java as well. Because I'm writing a Win32 application, I started learning the ins and outs of MSXML's SOM parser. As a learned more I did additional google searches and discovered Delphi has its own SOM parser.

Interfaces such as IXmlSchemaDoc and functions such as LoadXMLSchema and LoadXMLSchemaStr are undocumented but the source can be found in source\win32\xml\XMLSchema.pas. There is also sample code for parsing an XML Schema available BDN. With the aid of the sample code I was able to get my sample project working.

And in case you are wondering, the VCL library has a component called TXMLSchemaDoc that wraps Delphi's SOM parser into a handy component. You will not find it in the tool pallet though. For what it is worth, I found working with the interface (IXmlSchemaDoc) easy and I have not tried the TXMLSchemaDoc component.

posted by Kirby | 05-Apr-2006 4:26 PM | comments (0)

Add Your Comment

Comment:
(No HTML)

Name:
E-mail/Web site:
Your e-mail/web site will not be published on this site. It is optional and will only be used by me should I need to contact you directly.
 
By checking this option, this site will remember your name and e-mail/web site on future visits. Uncheck this option to have the site not remember who you are on future visits.
 
Enter the code shown above:
Copyright © 1999-2008 Kirby Turner.
Site software written by White Peak Software Inc, a provider of custom software and software development coaching.