Solved

create xmlReader from string

Posted on 2007-11-15
2
2,504 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
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…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

691 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