in this article there is an exmplae on how to use a schema to upload XML to a db :[url]http://www.sqljunkies.ddj.com/Article/650DF949-148D-46B3-9156-6783646F976D.scuk[/url]when i try to do :xml==>><OPEN> <HEAD> <SESSION>aaa34 </SESSION> </HEAD></OPEN>
schema==>><?xml version="1.0" ?><Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:xml:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <ElementType name="PALO" sql:is-constant="1"> <element type="HEAD" /> </ElementType><ElementType name="SESSION" dt:type="string" /><ElementType name="HEAD" sql:relation="test" ><element type="SESSION" sql:field="SESSION" /></ElementType></Schema>
everything work OK!but when i try to do :<OPEN> <HEAD> <SESSION>aaa34 </SESSION> </HEAD><HEAD2> <SESSION2>aaa32222 </SESSION2> </HEAD2></OPEN>
schema==>><?xml version="1.0" ?><Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:xml:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql" > <ElementType name="PALO" sql:is-constant="1"> <element type="HEAD" /><element type="HEAD2" /> </ElementType><ElementType name="SESSION" dt:type="string" /><ElementType name="HEAD" sql:relation="test" ><element type="SESSION" sql:field="SESSION" /></ElementType><ElementType name="SESSION2" dt:type="string" /><ElementType name="HEAD2" sql:relation="test" ><element type="SESSION2" sql:field="SESSION2" /></ElementType></Schema>
in this case i get 2 rows i nthe db,where only the session column gets a value but the session2 column stays empty - why is that?what is wrong with the schema?thnaks in advancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)