I'm currently trying to read an XML file of this format to transform it into a list but trying out the code in the comments gave me an error: this is how it looks like in IE. Obviously theres a close assets tag and close properties later
<Properties>
- <Assets>
- <Asset Name="" Version="">
<TestCase Name="" Version="" SubVersion="" />
<TestCase Name="" Version="" SubVersion="" />
<TestCase Name="" Version="" SubVersion="" />
<TestCase Name="" Version="" SubVersion="" />
</Asset>
So I did this:
XmlReader xReader = XmlReader.Create(new StringReader(xmlDoc));
where xml doc = @"\\visreP01\REFERENCES\default.reference.versions\default.reference.versions.properties.xml"
I'm planning to test how to iterate a name a version and so on to place them in a list iteratively. but during the reading the I got the data root level is invalid line 1 position 1.