if (nodeArrivalDate != null
&& nodeArrivalDate.NextSibling.InnerText == arrivalDate)
{
Label_1.Text = GetFieldTextValue(memberNode, "price");
Label_2.Text = GetFieldTextValue(memberNode, "price-excl-discount");
}
...
// GetFieldTextValue is method in the same class
private static string GetFieldTextValue(XmlNode memberNode, string fieldName)
{
string textValue = string.Empty;
XmlNode nodeField = memberNode.SelectSingleNode(string.Format("name[.=\"{0}\"]", fieldName));
if (nodeField != null && nodeField.NextSibling != null)
{
textValue = nodeField.NextSibling.InnerText;
}
return textValue;
}
|