Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return an ASP.NET XML DATASET WITHOUT THE SCHEMA

Status
Not open for further replies.

dkwaters

Programmer
Feb 16, 2003
17
0
0
GB
Hi,

I have produced an XML Web Service in ASP 2.0, this returns a dataset. The output is below:

<?xml version="1.0" encoding="utf-8" ?>
- <DataSet xmlns="- <xs:schema id="datareader" xmlns="" xmlns:xs=" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="datareader" msdata:IsDataSet="true" msdata:Locale="en-US">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="Results">
- <xs:complexType>
- <xs:sequence>
<xs:element name="UserName" type="xs:string" minOccurs="0" />
<xs:element name="Password" type="xs:string" minOccurs="0" />
<xs:element name="EstablishmentFullName" type="xs:string" minOccurs="0" />
<xs:element name="Address1" type="xs:string" minOccurs="0" />
<xs:element name="Address2" type="xs:string" minOccurs="0" />
<xs:element name="Town" type="xs:string" minOccurs="0" />
<xs:element name="County" type="xs:string" minOccurs="0" />
<xs:element name="Postcode" type="xs:string" minOccurs="0" />
<xs:element name="Authority" type="xs:string" minOccurs="0" />
<xs:element name="Telephone" type="xs:string" minOccurs="0" />
<xs:element name="Fax" type="xs:string" minOccurs="0" />
<xs:element name="PupilsonRoll" type="xs:string" minOccurs="0" />
<xs:element name="EducationNumber" type="xs:string" minOccurs="0" />
<xs:element name="KB_ID" 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">
- <datareader xmlns="">
- <Results diffgr:id="Results1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<UserName>spirit_sys</UserName>
<Password>Gh05t5ly</Password>
<EstablishmentFullName>Gravesend Grammar School</EstablishmentFullName>
<Address1>Church Walk</Address1>
<Address2>Milton</Address2>
<Town>GRAVESEND</Town>
<County>Kent</County>
<Postcode>DA12 2PR</Postcode>
<Authority>Kent</Authority>
<Telephone>01474 331893</Telephone>
<Fax>01474 331894</Fax>
<PupilsonRoll>1000</PupilsonRoll>
<EducationNumber>17219</EducationNumber>
<KB_ID>15</KB_ID>
</Results>
</datareader>
</diffgr:diffgram>
</DataSet>

I want to remove the schema at the top. I have searched higth and low and cannot find anything? Is it even possible. I have tried returning the dataset as string but this removes the row counter on every line.

I would really appreciate any help



thanks
 
Try using dataset.writeXML(filename, IgnoreSchema). Then send the file. Or you could use the XML string and just crop the first chunk with sXML = sXML.substring(xSML.FirstIndexOf("</xs:schema>") + 11) and then send the string back.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top