How do you read xml data from a project resource into a dataset? -


I have an XML file that is a project resource. I can access it through properties. The Resource.Drive Settings XML file looks like this:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; FilterOffsets & gt; & Lt; FocusOffset & gt; & Lt; Serialnumber & gt; 12543 & lt; / Serialnumber & gt; & Lt; Filter & gt; 4 & lt; / Filter & gt; & Lt; Wheel & gt; & Lt; / Wheel & gt; & Lt; Offset & gt; 7 & lt; / Offset & gt; & Lt; / FocusOffset & gt; & Lt; / FilterOffsets & gt;  

I want to load this data into a xmlDataDocument dataset. If I use this code, then xmlDataDoc.LoadXml (properties.Resources.DriverSettings); The data is not loaded in the dataset. There are 0 tables in it, is it that my XML is formatted incorrectly? How can I get the data in a dataset and then change the dataset and write back to XML?

itemprop = "text">

What you have to do, first read the resource in string , and then enter that Using loadXml from string


Comments