Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2003, 02:15 PM
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to dimondwoof
Default XML to String in VB.NET

I've got an XML document object that I would like to convert to a string object. I'm trying to send the XML via a WinHTTPRequest and the .SEND method wants a string object to be passed to it.
 
Old June 24th, 2003, 10:40 PM
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm a big fan of C#, but I'm guessing VB is quite similar. Try WriteTo and WriteContentTo. You will most likely have to deal with streams to pull this off.

One way to do it if you really want a string is to get the XML into a stream (using WriteTo), and then reading the entire stream as a string (check out the various Read methods)

Check out http://samples.gotdotnet.com/QuickSt...lDocument.aspx for a quick tutorial

and

For the list of methods, properties and their description, check out
http://msdn.microsoft.com/library/de...pref_start.asp

Cheers,
Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.net, adding XML data to an existing XML file saikoboarder XML 11 April 17th, 2008 04:19 PM
Send A String Of Xml To Sql Using .Net alyeng2000 General .NET 0 March 8th, 2005 11:53 AM
problem in getting provider string in vb.net sumeghagupta General .NET 2 October 9th, 2004 12:07 PM
VB.NET: Convert String and append to Xml files toytoy Pro VB.NET 2002/2003 0 September 2nd, 2004 10:50 PM
XML to XML through an XSLT (VB.NET) dimondwoof XSLT 1 June 25th, 2003 12:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.