I have an xml file that I have to read it and extract values from nodes in to some variables, I came across a node that I don't know how to extract data, this is the node:
<QuantityInIssueUnit uom="KO">288.000</QuantityInIssueUnit>
So i have to extract KO and 288.00 and pass it to variables, i tried this:
if (!dr_art_line.Table.Columns.Contains("QuantityInIssueUnit") ||
dr_art_line["QuantityInIssueUnit"].ToString().Length <= 0)
{
QuantityInIssueUnit = 0;
}
else
{
QuantityInIssueUnit = Convert.ToDecimal(dr_art_line["QuantityInIssueUnit"]);
{
and this:
if (!dr_art_line.Table.Columns.Contains("QuantityInIssueUnit uom") || dr_art_line["QuantityInIssueUnit uom"].ToString().Length <= 0)
{
QuantityInIssueUnit_uom = 0;
}
else
{
QuantityInIssueUnit_uom = Convert.ToDecimal(dr_art_line["QuantityInIssueUnit uom"]);
}
But every time the QuantityInIssueUnit is 0, I know I'm doing somethig wrong in reading, what is the propper way to read this kind of node?
Thanks!