EDN Admin
Well-known member
Hi All,
I have a strange sutuation where I had one attibutes with differen values - how do I programatically reterive both values? Below is sample XML and Code!! Any suggestions?
<pre class="prettyprint foreach (MSXML2.IXMLDOMNode xmlnd in elemList)
{
//Gets gfile name - happy
// get deal if and save it to outputfile without probs
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/Deaid").attributes.getNamedItem("Value").text;
dict.Add("Deaid", sValue
// FileName deal if and save it to outputfile without probs
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/FileName").attributes.getNamedItem("Value").text;
dict.Add("FileName", sValue
//Below always gets first ccy EUR, but unable get GBP
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/CCY").attributes.getNamedItem("Value").text;
}
SAMPLE XML File
<Property Name="Deaid" Value="ABC" Key="false"/>
<Property Name="FileName" Value="XYZ" Key="false"/>
<Property Name="CCY" Value="EUR" Key="false"/>
<Property Name="CCY" Value="GBP" Key="false"/>[/code]
<br/>
View the full article
I have a strange sutuation where I had one attibutes with differen values - how do I programatically reterive both values? Below is sample XML and Code!! Any suggestions?
<pre class="prettyprint foreach (MSXML2.IXMLDOMNode xmlnd in elemList)
{
//Gets gfile name - happy
// get deal if and save it to outputfile without probs
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/Deaid").attributes.getNamedItem("Value").text;
dict.Add("Deaid", sValue
// FileName deal if and save it to outputfile without probs
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/FileName").attributes.getNamedItem("Value").text;
dict.Add("FileName", sValue
//Below always gets first ccy EUR, but unable get GBP
sValue = xmlnd.childNodes[1].selectSingleNode("Properties/CCY").attributes.getNamedItem("Value").text;
}
SAMPLE XML File
<Property Name="Deaid" Value="ABC" Key="false"/>
<Property Name="FileName" Value="XYZ" Key="false"/>
<Property Name="CCY" Value="EUR" Key="false"/>
<Property Name="CCY" Value="GBP" Key="false"/>[/code]
<br/>
View the full article