in reply to How to use xml schema in perl
I think you are talking in part about "XML Schema Inference", that is generating an XSD schema from an existing instance of XML. As far as I know there is no module on CPAN that provides this facility (though I would be delighted to be proved wrong.) The basic problem of schema inference (or extraction if you would rather) is described in this paper.
Personally if I need to generate a schema from an existing XML document I use the xsd.exe that is part of the .NET framework, this is also available for mono if you are not on Windows and the mono implementation is described here.
As for validating an instance against an existing schema, you have a choice - you can use XML::Validator::Schema or the facilities in XML::LibXML among others that you will have seen when you performed the search on CPAN as davorg suggested.
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to use xml schema in perl
by maspalio (Scribe) on Aug 11, 2006 at 13:35 UTC | |
by astroboy (Chaplain) on Aug 11, 2006 at 18:09 UTC | |
by maspalio (Scribe) on Aug 16, 2006 at 06:09 UTC |