Solved

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

Posted on 2006-07-05
5
622 Views
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,
Joe
0
Comment
Question by:DalTXColtsFan
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
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

Cheers!
0
 
LVL 2

Author Comment

by:DalTXColtsFan
Comment Utility
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.

Joe
0
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
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

cheers
0
 
LVL 2

Author Comment

by:DalTXColtsFan
Comment Utility
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,
Joe
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
Comment Utility
> 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

cheers
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Update a XML node 6 31
VB.NET WEb Service complex type 14 57
D3, SVG, dragging a star. 2 105
parse convert xml feed to text (python) 2 25
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now