Solved

create xmlReader from string

Posted on 2007-11-15
2
2,498 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now