<?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://tempuri.org/"> <Getstore> <Goods> <product_no>FB22S58613</product_no> <product_class>女鞋</product_class> <SKU> <product_no>FB22S58613</product_no> <color>46</color> <product_size>39</product_size> <color1>46</color1> <product_class>女鞋</product_class> <number3>3</number3> <number7>0</number7> <number8>0</number8> <number>50</number> <number9>0</number9> </SKU> <SKU> <product_no>FB22S58613</product_no> <color>36</color> <product_size>39</product_size> <color1>36</color1> <product_class>女鞋</product_class> <number3>2</number3> <number7>0</number7> <number8>0</number8> <number>50</number> <number9>0</number9> </SKU> </Goods> </Getstore> </string>
DataSet ds = api.get_xmlstore(productno,color,productsize,users,user_key); ds.Tables[0].TableName = "Goods"; ds.Tables[1].TableName = "SKU"; DataRelation relation = new DataRelation("SKU", ds.Tables [0].Columns["product_no"], ds.Tables[1].Columns["product_no"]); relation.Nested = true; ds.Relations.Add(relation); ds.DataSetName = "Getstore"; XmlDataDocument xda = new XmlDataDocument(ds);