I have a question according to asmxml.
I try to write a schema to a xml file. The schema looks like following:
<schema>
<document name="XRF">
<collection name="IL">
<attribute name="k"/>
<collection name="I">
<attribute name="k"/>
<collection name="M">
<attribute name="k"/>
<attribute name="v"/>
</collection>
<collection name="P">
<attribute name="k"/>
<attribute name="v"/>
<attribute name="t"/>
<attribute name="d"/>
</collection>
</collection>
</collection>
</document>
</schema>
Here the snippet from The XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--<!DOCTYPE XRF SYSTEM "/apid/xml/xrf.dtd">-->
<XRF r="8.5.2" c="iD2" g="" u="DE23580-apiinlife03" k="918887283" d="20120523" t="235602">
<IL k="1">
<I k="1007667,361,402">
<M k="3" v="GB0008762899"/>
<M k="187" v="BG Group" l="4"/>
<P k="33,3,2" v="13.065" t="181502" d="20120522" y="524" n="0" b="779"/>
<P k="2,1,1" v="12.56" t="080025" d="20120523" z="74876" y="272" n="459" b="908"/>
<P k="41,1,1" s="5"/>
<P k="9,3,2" v="12.73" t="163519" d="20120522" z="8322" y="158" n="0" b="779"/>
</I>
</IL>
</XRF>
Could someone help me to fix the “schema”? I don’t know what am I doing wrong.
Thank you in advance.
Greetings
z.
Old question, but perhaps it could help some new users landing here.
While defining a schema with AsmXML, you cannot imbricate directly collections like that.
You would rather link a reference to the appropriate definition of the collection you want to use by defining the collection outside the
<document>section. For example, the correct schema in your case would be :Also, be sure to include all the attributes needed in your collection, you can also use groups to do this.
More can be found there : http://tibleiz.net/asm-xml/documentation.html
Hope this helps !