Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validate XML with XSD

Status
Not open for further replies.

goBoating

Programmer
Joined
Feb 8, 2000
Messages
1,606
Location
US
Hello All,
I've tried the search approach to no avail, so here's the question.

I'm trying to do a very simple thing, it would seem. On a Win32 platform, I'm trying to validate an XML document against its XSD. It is very straight forward with XML::LibXML on a Linux/Unix machine, but, LibXML is a GNOME project. I've found a Win32 binary of the LibXML stuff, but, I can't get it to work. So, does anyone have any idea about how to validate an XML document with its associated XSD using ActivePerl on a Win32 machine?

I don't immediately see a clean way to do it in the ActivePerl docs, but, I'll keep digging. 'Seems like someone must have done this trick a thousand times before.

TIA

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Ended up using the Apache Xerces libs and XML::Xerces Perl module. There are Win32 binaries of the libs available. See the site. And, the XML::Xerces install is a typical module install. The install bundle came with some examples. One of which was 'validate.pl' which does exactly what I was looking for. I modified the formating and content of the error reporting subs and little and it works nicely.

I don't know if this is the best possible way to do this trick, but, the Xerces project seems to be a solid project (part of the Apache foundation) and it works well.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top