<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Having an issue with trying to process xml.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Test code is:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">#!/usr/bin/perl</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use strict;</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use warnings;</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use XML::Compile::Cache;</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use XML::Compile::Util qw(pack_type);</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use Data::Dumper;</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">use Log::Report mode => 'DEBUG';</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">my $schemas = XML::Compile::Cache->new( [glob "testxsd/*.xsd"], 'allow_undeclared' => 1 );</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">$schemas->declare( READER => pack_type( 'urn:ietf:params:xml:ns:epp-1.0', 'epp' ) );</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">$schemas->compileAll;</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">my $doc = XML::LibXML->new->parse_string(<<"END_XML");</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><?xml version="1.0" encoding="utf-8"?></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><epp xmlns="urn:ietf:params:xml:ns:epp-1.0"></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <response></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <result code="1000"></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <msg>Command completed successfully</msg></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </result></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <resData></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <domain:chkData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <domain:cd></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <domain:name avail="1">1980s.game</domain:name></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </domain:cd></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </domain:chkData></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </resData></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <extension></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:chkData xmlns:fee="urn:ietf:params:xml:ns:fee-0.7"></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:cd></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:name>1980s.game</fee:name></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:currency>USD</fee:currency></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:command>create</fee:command></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:period unit="y">2</fee:period></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:class>standard</fee:class></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <fee:fee grace-period="P0D" description="Domain registration (per year)" refundable="1">600.00</fee:fee></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </fee:cd></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </fee:chkData></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </extension></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <trID></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <clTRID>4d19dd959727a0f3e1225df2ee9a55e4</clTRID></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> <svTRID>eaefc4f9dd5e9c43288308348a21c30b</svTRID></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </trID></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"> </response></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"></epp></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">END_XML</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">my $struct = $schemas->reader(pack_type('urn:ietf:params:xml:ns:epp-1.0','epp'))->( $doc->documentElement );</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1">print Dumper($struct);</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Running the script presents the following output:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default"><font size="1">trace: cache parsed file /root/craig/EPP/testxsd/domain-1.0.xsd-1490007452-14154</font></div><div class="gmail_default"><font size="1">trace: parsing XML from file testxsd/domain-1.0.xsd</font></div><div class="gmail_default"><font size="1">trace: register prefix domain for 'urn:ietf:params:xml:ns:domain-1.0'</font></div><div class="gmail_default"><font size="1">trace: register prefix host for 'urn:ietf:params:xml:ns:host-1.0'</font></div><div class="gmail_default"><font size="1">trace: register prefix epp for 'urn:ietf:params:xml:ns:epp-1.0'</font></div><div class="gmail_default"><font size="1">trace: register prefix eppcom for 'urn:ietf:params:xml:ns:eppcom-1.0'</font></div><div class="gmail_default"><font size="1">trace: cache parsed file /root/craig/EPP/testxsd/epp-1.0.xsd-1490007452-12773</font></div><div class="gmail_default"><font size="1">trace: parsing XML from file testxsd/epp-1.0.xsd</font></div><div class="gmail_default"><font size="1">trace: cache parsed file /root/craig/EPP/testxsd/eppcom-1.0.xsd-1490007452-2531</font></div><div class="gmail_default"><font size="1">trace: parsing XML from file testxsd/eppcom-1.0.xsd</font></div><div class="gmail_default"><font size="1">trace: cache parsed file /root/craig/EPP/testxsd/fee-0.7.xsd-1490007452-8524</font></div><div class="gmail_default"><font size="1">trace: parsing XML from file testxsd/fee-0.7.xsd</font></div><div class="gmail_default"><font size="1">trace: register prefix fee for 'urn:ietf:params:xml:ns:fee-0.7'</font></div><div class="gmail_default"><font size="1">trace: declare {urn:ietf:params:xml:ns:epp-1.0}epp READER</font></div><div class="gmail_default"><font size="1">trace: schema compile READER for {urn:ietf:params:xml:ns:epp-1.0}epp</font></div><div class="gmail_default"><font size="1">trace: using preparsed XML node <{urn:ietf:params:xml:ns:epp-1.0}epp></font></div><div class="gmail_default"><font size="1">trace: schema compile READER for {urn:ietf:params:xml:ns:domain-1.0}chkData</font></div><div class="gmail_default"><font size="1">trace: auto-convert known type for 'any': {urn:ietf:params:xml:ns:domain-1.0}chkData</font></div><div class="gmail_default"><font size="1">trace: using preparsed XML node <{urn:ietf:params:xml:ns:domain-1.0}chkData></font></div><div class="gmail_default"><font size="1">trace: schema compile READER for {urn:ietf:params:xml:ns:fee-0.7}chkData</font></div><div class="gmail_default"><font size="1">trace: auto-convert known type for 'any': {urn:ietf:params:xml:ns:fee-0.7}chkData</font></div><div class="gmail_default"><font size="1">trace: using preparsed XML node <{urn:ietf:params:xml:ns:fee-0.7}chkData></font></div><div class="gmail_default"><font size="1">error: element `{urn:ietf:params:xml:ns:fee-0.7}fee' not processed for fee:chkData/cd at /*/*/*[3]/fee:chkData/fee:cd/fee:fee</font></div><div class="gmail_default"><font size="1"> at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 585</font></div><div class="gmail_default"><font size="1">Log::Report::error("Log::Report::Message=HASH(0x3291f38)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 585</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::_not_processed("XML::LibXML::Element=SCALAR(0x334ff08)", "fee:chkData/cd") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 634</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x33652b8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 502</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x33652b8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 476</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x33652b8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 456</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32bc268)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 134</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32bc268)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 632</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32bc268)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 502</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32bc268)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 93</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::LibXML::Element=SCALAR(0x3346390)") at /usr/local/share/perl5/XML/Compile/Cache.pm line 596</font></div><div class="gmail_default"><font size="1">XML::Compile::Cache::_convertAnyTyped("XML::Compile::Cache=HASH(0x308fdc0)", "{urn:ietf:params:xml:ns:fee-0.7}chkData", "ARRAY(0x3360ab0)", "epp:epp/response/extension#any", "XML::Compile::Translate::Reader=HASH(0x30f63b8)") at /usr/local/share/perl5/XML/Compile/Cache.pm line 96</font></div><div class="gmail_default"><font size="1">XML::Compile::Cache::__ANON__("{urn:ietf:params:xml:ns:fee-0.7}chkData", "ARRAY(0x3360ab0)", "epp:epp/response/extension#any", "XML::Compile::Translate::Reader=HASH(0x30f63b8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 1049</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x30f6448)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 133</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x30f6448)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 632</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x30f6448)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 502</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x30f6448)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 418</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32436e8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 145</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32436e8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 632</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32436e8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 502</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32436e8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 476</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x32436e8)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 412</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x2169f40)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 188</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x2169f40)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 632</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x2169f40)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 502</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::Compile::Iterator=HASH(0x2169f40)") at /usr/local/share/perl5/XML/Compile/Translate/Reader.pm line 93</font></div><div class="gmail_default"><font size="1">XML::Compile::Translate::Reader::__ANON__("XML::LibXML::Element=SCALAR(0x30f38d0)") at <a href="http://testnew.pl">testnew.pl</a> line 49</font></div><div class="gmail_default"><font size="1"><br></font></div><div class="gmail_default">The fee Schema is attached, if anybody could tell me what I'm doing wrong that would be amazing.</div><div class="gmail_default"><br></div><div class="gmail_default">Cheers.</div><div style="font-size:small"><br></div></div><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr">Craig Marchant<br></div></div></div></div>
</div>