I have the following XML
<xml>
<ObsCont xCampo="field1">
<xTexto>example1</xTexto>
</ObsCont>
<ObsCont xCampo="field2">
<xTexto>example2</xTexto>
</ObsCont>
<ObsCont xCampo="field3">
<xTexto>example3</xTexto>
</ObsCont>
<field>information</field>
</xml>
Is there a way to get the content of "xTexto" inside the ObsCont that has "field2" value for the attribute xCampo using DataSet ?
It would be desireable to have a single liner like the following:
DataSet ds = new DataSet();
ds.ReadXml(StrArquivoProc);
ds.Tables["xml"].Rows[0]["field"].ToString();
//field == "information"
If I use the same method I'm not specifying that I want the one with the desired attribute.