Webservice returns recordset as XML-File

  • Thread starter Thread starter Michael Haberfellner
  • Start date Start date
M

Michael Haberfellner

hi everyone,

as newbee in asp.net-webservices i was looking for examples, solving the
following problem:

i do have to programm a webservice that connects to a sql-server and
selects a recordset by the handed id (parameter of the webservice). so
far no problem.

but the webservice should return the data of the recordset as XML. for
example the return-value could look like

<id>1</id>
<name>mike</name>
<age>33</age>

has anybody done this allready?

i'd be glad for any hint, tipp or expample you could give me.

thx and greets from vienna

mike
 
If you mean: how to convert a dataset to a xml file, this code may help you.

myDataSet.WriteXml(m_XmlFile, XmlWriteMode.IgnoreSchema)
 
Back
Top