Solved

vb.net - how do I use the xmlreader.create with a string rather than a file

Posted on 2012-04-04
2
291 Views
Last Modified: 2012-04-04
I have a string that contains a xml file and want to read this with xml reader - the xmlreader.create command seems to want a file path?
If there a way to read the string into the xmlreader?.
0
Comment
Question by:donhannam
[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 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37809121
Try:

Dim xml As String = "<root><somechild><somegrandchild></somegrandchild></somechild></root>"
Dim sReader As New System.IO.StringReader(xml)
Dim xReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(sReader)

Open in new window

0
 

Author Closing Comment

by:donhannam
ID: 37809390
Thanks that was what I as after
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 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