I want to create an application for android with C # using Xamarin, it takes an information "xml" and puts it on the screen, but I can not manipulate xml.
I need to look for the "symbol" in the xml and if I find the information and put it in variables, however I can not:
xml example:
<?xml version="1.0" encoding="utf-8" ?>
<Itens>
<tb>
<simbolo>G</simbolo>
<nAtomic>56</nAtomic>
<valencia>5</valencia>
</tb>
<tb>
<simbolo>Ga</simbolo>
<nAtomic>565</nAtomic>
<valencia>55</valencia>
</tb>
</Itens>
When I use StreamReader
:
StreamReader strm = new StreamReader ("Db.xml");
XDocument xd = XDocument.Load(strm); //......
It gives the following error:
Error CS0246: The type or namespace name 'StreamReader' could not be found (CS0246)
I thought about using XmlTextReader
but I do not know how I can, can anyone help me?