*/
Are you blogging on PH? Get your free blog.

Other Views

corner
*/

XML FAQ - Writing XMLReader Data to a Web Page

How to write XmlReader data to a web page?

Here is an example:

//For example SQL server is returning some data from this 
//simple stored procedure. It returns XML: 
SELECT * FROM  MySQLTable 
FOR XML AUTO 
// Capture the return value in an XmlReader like so: 
XmlReader xmlr = mySqlCommand.ExecuteXmlReader();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlr) 
//send it to webpage
Response.write(xmlDoc.InnerXml)


Back to XML FAQ


corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.