xml - creating dataset relationship in xsd -



xml - creating dataset relationship in xsd -

i need help creating xsd, new in xml , searched cannot figure out problem is. need create schema later can upload them 2 tables tmp_action , tmp_domains. actionguid foreign key tmp_domain.

here sample data:

<root> <action> <guid>68e29804-299e-4dc5-a22e-b652be5de8f1</guid> <actiontype>scan</actiontype> <starttime>2014-06-13t16:02:27</starttime> <endtime>2014-06-14t05:27:37</endtime> <domain> <name>devtest</name> <parentname></parentname> <dnsroot>abcd</dnsroot> <ncname>efgh</ncname> <treename></treename> <displayname></displayname> <whenchanged>2014-04-01t08:03:45</whenchanged> <usnchanged>16411</usnchanged> </domain> </action> </root>

and schema creating:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <xsd:annotation> <xsd:appinfo> <sql:relationship name="actionactiondomain" parent="action" parent-key="guid" child="domain" child-key="actionguid" /> </xsd:appinfo> </xsd:annotation> <xsd:element name="root" sql:is-constant="1" > <xsd:complextype> <xsd:sequence> <xsd:element name="action" sql:relation="tmp_action" > <xsd:complextype> <xsd:sequence> <xsd:element name="guid" type="xsd:string" /> <xsd:element name="actiontype" type="xsd:string" /> <xsd:element name="starttime" type="xsd:datetime" /> <xsd:element name="endtime" type="xsd:datetime" /> <xsd:element name="domain" sql:relation="actiondomain" sql:relationship="actionactiondomain" > <xsd:complextype> <xsd:sequence> <xsd:element name="name" type="xsd:string" /> <xsd:element name="parentname" /> <xsd:element name="dnsroot" type="xsd:string" /> <xsd:element name="ncname" type="xsd:string" /> <xsd:element name="treename" /> <xsd:element name="displayname" /> <xsd:element name="whenchanged" type="xsd:datetime" /> <xsd:element name="usnchanged" type="xsd:unsignedshort" /> </xsd:sequence> </xsd:complextype> </xsd:element> </xsd:sequence> </xsd:complextype> </xsd:element> </xsd:sequence> </xsd:complextype> </xsd:element> </xsd:schema>

i error parent/child table of relationship on 'domain' not match.

can please help me this? many thanks!

xml xsd sqlxml

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -