Solved

create xmlReader from string

Posted on 2007-11-15
2
2,500 Views
Last Modified: 2010-10-05
In vb.net, how can we load a string [well formated xml] to XMLReader?

XMLReader.create only accepts a xml file saved in file system?
0
Comment
Question by:sansoftura
2 Comments
 
LVL 8

Accepted Solution

by:
sjturner2 earned 250 total points
ID: 20359566
You need to create a StringReader arounf the string and pass that to the XmlReader.Create method.
Dim xmlData As String = "<item productID='124390'>" & _ 
                                     "<price>5.95</price>" & _ 
                                     "</item>"
 
' Create the XmlReader object.
Dim reader As XmlReader = XmlReader.Create(New StringReader(xmlData))

Open in new window

0
 
LVL 6

Author Comment

by:sansoftura
ID: 20368382
thanks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Path of Workbook 3 77
Redirect HTTP to HTTPS in Azure 4 62
API Soap Calls 4 113
Optimum versions of Selenium Webdriver with Python On Windows 7 1 106
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question