Groups | Blog | Home
all groups > dotnet xml > august 2003 >

dotnet xml : Newbie: Return a xml-document to client


Daniel Johansson
8/12/2003 9:31:56 AM
Hi

I have a webservice that generates a xmldocument when you call it either
from a .aspx-site or with http-GET.
eg. http://...ws.asmx/method?arg1&arg2
I now want to present this xmldocument for the user i his/her webclient (eg
Internet Explorer). I cannot return the xml-document as a dataset since
"
The same table (ContactAddress) cannot be the child table in two nested
relations.
at System.Data.DataRelation.CheckNestedRelations()
"

A problem with the datasets. Hence my xmldocument isn´t compatible with a
dataset.

My question is how i should solve this problem. I can return a void and
simply Redirect to the place
where my xml-document is but that isn´t very nice.

And btw, how do I stream and return the xmldocument, it doesn´t seem
practicle to write a new
document for every request.

Regards
// Daniel


SQL Server Development Team [MSFT]
8/12/2003 11:30:18 AM
Try returning the document element (see XmlDocument.DocumentElement
property) instead of the document.

Daniel D.C.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
[quoted text, click to view]

Daniel Johansson
8/13/2003 11:32:33 AM
It work´s!

Thank you very much!

Regards
// Daniel
"SQL Server Development Team [MSFT]" <sqldev@microsoft.com> skrev i
meddelandet news:eV7KC$PYDHA.2344@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button