|
14.04.2014, 12:14
#38614071
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
|
|
|
|
Написала веб-сервис
1. 2. 3. 4. 5. 6. 7.
[WebMethod]
public DataSet PolinaTestDS(string DocDate, string DocNumber, string CustCode_GB)
{
DataSet ds = new DataSet();
....
return ds;
}
получаю xml вида
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<DataSet xmlns="http://SEQUEL/">
<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="GB_InvoicePosition">
<xs:complexType>
<xs:sequence>
<xs:element name="OrderDate" type="xs:string" minOccurs="0"/>
<xs:element name="DocNo" type="xs:string" minOccurs="0"/>
<xs:element name="GB_Code" type="xs:string" minOccurs="0"/>
<xs:element name="GB_Name" type="xs:string" minOccurs="0"/>
<xs:element name="ProducerGroup" type="xs:string" minOccurs="0"/>
<xs:element name="certificate" type="xs:string" minOccurs="0"/>
<xs:element name="BatchNo" type="xs:string" minOccurs="0"/>
<xs:element name="SalesPriceVAT" type="xs:string" minOccurs="0"/>
<xs:element name="SalesPrice" type="xs:string" minOccurs="0"/>
<xs:element name="Qty" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<GB_InvoicePosition diffgr:id="GB_InvoicePosition1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<OrderDate>23.01.2014 0:00:00</OrderDate>
<DocNo>9142/20</DocNo>
<GB_Code>11666</GB_Code>
<GB_Name>Товар 1</GB_Name>
<ProducerGroup>Stada Arzneimittel AG</ProducerGroup>
<certificate>865130152</certificate>
<BatchNo>440613</BatchNo>
<SalesPriceVAT>33,2533333333333</SalesPriceVAT>
<SalesPrice>30,23</SalesPrice>
<Qty>3</Qty>
</GB_InvoicePosition>
<GB_InvoicePosition diffgr:id="GB_InvoicePosition2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
<OrderDate>23.01.2014 0:00:00</OrderDate>
<DocNo>9142/20</DocNo>
<GB_Code>18441</GB_Code>
<GB_Name>Товар 2</GB_Name>
<ProducerGroup>Teva</ProducerGroup>
<certificate>865086724</certificate>
<BatchNo>8043</BatchNo>
<SalesPriceVAT>436,953333333333</SalesPriceVAT>
<SalesPrice>397,23</SalesPrice>
<Qty>3</Qty>
</GB_InvoicePosition>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
как можно избавиться от схемы и доп данных в xml? Мне нужен простой xml вида
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26.
<NewDataSet>
<GB_InvoicePosition>
<OrderDate>23.01.2014 0:00:00</OrderDate>
<DocNo>9142/20</DocNo>
<GB_Code>11666</GB_Code>
<GB_Name>Товар 1</GB_Name>
<ProducerGroup>Stada Arzneimittel AG</ProducerGroup>
<certificate>865130152</certificate>
<BatchNo>440613</BatchNo>
<SalesPriceVAT>33,2533333333333</SalesPriceVAT>
<SalesPrice>30,23</SalesPrice>
<Qty>3</Qty>
</GB_InvoicePosition>
<GB_InvoicePosition>
<OrderDate>23.01.2014 0:00:00</OrderDate>
<DocNo>9142/20</DocNo>
<GB_Code>18441</GB_Code>
<GB_Name>Товар 2</GB_Name>
<ProducerGroup>Teva</ProducerGroup>
<certificate>865086724</certificate>
<BatchNo>8043</BatchNo>
<SalesPriceVAT>436,953333333333</SalesPriceVAT>
<SalesPrice>397,23</SalesPrice>
<Qty>3</Qty>
</GB_InvoicePosition>
</NewDataSet>
|
|
|