#!/usr/local/bin/perl use warnings; use strict; use Data::Dumper; use XML::Compile::Schema; use XML::LibXML::Reader; my $xsd = 'test.xsd'; my $schema = XML::Compile::Schema->new($xsd); # This will print a very basic description of what the schema describes $schema->printIndex(); # this will print a hash template that will show you how to construct a # hash that will be used to construct a valid XML file. # # Note: the second argument must match the root-level element of the XML # document. I'm not quite sure why it's required here. warn $schema->template('PERL', 'addresses');