Hi,
I am new on webservices and xml and I am trying to return a dataset from my
Sqlserver database. I have it running but I get the following result:
<?xml version="1.0" encoding="utf-8" ?>
- <DataSet xmlns="http://lonestarmilk.net/Test">
- <xs:schema id="dsEquity"
targetNamespace="http://www.tempuri.org/dsEquity.xsd"
xmlns:mstns="http://www.tempuri.org/dsEquity.xsd"
xmlns="http://www.tempuri.org/dsEquity.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
- <xs:element name="dsEquity" msdata:IsDataSet="true">
- <xs:complexType>
- <xs:choice maxOccurs="unbounded">
- <xs:element name="EquityHist">
- <xs:complexType>
- <xs:sequence>
<xs:element name="ProdNumber" type="xs:int" />
<xs:element name="Date" type="xs:dateTime" />
<xs:element name="Lbs" type="xs:double" />
<xs:element name="PerUnits" type="xs:double" minOccurs="0" />
<xs:element name="CashPat" type="xs:double" minOccurs="0" />
<xs:element name="NonCashPat" type="xs:double" minOccurs="0" />
<xs:element name="Comments" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
- <xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:EquityHist" />
<xs:field xpath="mstns:ProdNumber" />
<xs:field xpath="mstns:Date" />
<xs:field xpath="mstns:Lbs" />
</xs:unique>
</xs:element>
</xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <dsEquity xmlns="http://www.tempuri.org/dsEquity.xsd">
- <EquityHist diffgr:id="EquityHist1" msdata:rowOrder="0">
<ProdNumber>3400</ProdNumber>
<Date>2002-12-31T00:00:00.0000000-06:00</Date>
<Lbs>7327172</Lbs>
<PerUnits>5955.47</PerUnits>
<CashPat>7429.75</CashPat>
<NonCashPat>29719.01</NonCashPat>
<Comments>2002 Summary</Comments>
</EquityHist>
I don’t want to show the schema I just want to return Data from the line
<EquityHist diffgr:id="EquityHist1" msdata:rowOrder="0">
and all the rows of my table.
I tried to use ReadXml and return a string from my webservice but I think
that I am loosing the essence of Xml. Can somebody tell me how to return just
data and not the schema on my webservice?
Thanks a lot
--
Oswaldo Cortes