Tools for validating a large XML file against a complex XSD file?

Posted on 2006-07-05
Medium Priority
Last Modified: 2008-02-26
Greetings experts,

I am in a position where I am frequently needing to validate large (>60Meg) XML files against complex XSD files, and then when validation fails, be able to determine exactly why not and fix the problem ASAP.  (The XSD files include other XSD files which include other XSD files - it's a mess!)

XMLSpy worked wonderfully, but my trial period expired and my boss won't buy it for me.

XMLCooktop works reasonably well for small XML files, but is not 100% dependable even in those cases and is next to useless for 50 to 60 Meg files.

I have Visual Studio 6.0 - is there something in there I can use?  Would it be reasonably easy to write Visual Basic code to do it?

Are there any other freeware tools or other "tricks of the trade" I can take advantage of?

Appreciating any advice/help,
Question by:DalTXColtsFan
  • 3
  • 2
LVL 60

Expert Comment

by:Geert Bormans
ID: 17045950
Hi DalTXColtsFan,
> XMLSpy worked wonderfully, but my trial period expired and my boss
> won't buy it for me.

note that XMLSpy schema parsing has quiet a number of bugs when schemata become complex
the only way Spy gives 100% correct validation is when the schema was created using Spy
If that is the case, you might be dissapointed with another, possibly more correct tool

60 Meg isn't that problematically big, so you have quiet some options
You can download Xerces from the apache project: http://xerces.apache.org/
(Java, C or even in an IDE such as Oxygen www.oxygenxml.com...)
Oxygen does not come for free, but the license is quiet somewhat cheaper then Spy,
if you really need an IDE....
but you can use Xerces commandline as well


Author Comment

ID: 17046274
Thanks Gert!

I downloaded Xerces but I'm having trouble finding out how to do what I want.  Can you help me find the documentation, or better yet, give me a pointer in the right direction on how to validate a particular XML file against a particular XSD and get a list of reasons it failed validation?

That Oxygen one looks good - thanks.

LVL 60

Expert Comment

by:Geert Bormans
ID: 17046413
just pick Xerces-C
read the installation guide
pick the samples, eg. you can run memparse : http://xml.apache.org/xerces-c/memparse.html
(by using a sample, you don't have to package this in your own application)
make sure you have the correct command line parameters
you ll get the error messaging you need


Author Comment

ID: 17050170
I'm sorry if it seems like I'm asking to be spoonfed but I simply do not find xerces's documentation the least bit intuitive.

The memparse seems to be wanting to validate the document "in a memory buffer" - what is the memory buffer and how do I load *my* file into it?

Sorry again and thanks,
LVL 60

Accepted Solution

Geert Bormans earned 2000 total points
ID: 17050299
> I'm sorry if it seems like I'm asking to be spoonfed but I simply do not find xerces's documentation the least bit intuitive.


well, it has been a while since I last used xerces outside Oxygen or Stylus
I remember I took a sample... likely it was not memparse then
try SAXCount

SAXCount -v=always -n -s -f yourfilename.xml


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

840 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