Hi All,
SXPDictionaryItemsGetResult is a XML element given below
<SXPDictionaryItemsGetResult>
<DictionaryItems>
<TimeZoneConverter>
<Key>127928320</Key>
<Revision>2</Revision>
<Name>India_Bharti</Name>
<Conversion>0</Conversion>
</TimeZoneConverter>
<TimeZoneConverter>
<Key>127928321</Key>
<Revision>1</Revision>
<Name>Spain_Amena</Name>
<Conversion>0</Conversion>
</TimeZoneConverter>
<TimeZoneConverter>
<Key>127928325</Key>
<Revision>2</Revision>
<Name>ER_Kista</Name>
<Conversion>1</Conversion>
</TimeZoneConverter>
</DictionaryItems>
</SXPDictionaryItemsGetResult>
I want to retreive using VB.NET(actually i m using VB.NET in a ASP.NET Page)
that value present inside the conversion which belongs to ER_Kista.
e.g. 1 here (for India_Bharti)
so is there any loop required ,kindly tell me as how to get it?
The general solution should be like a parameter passed (which wil be value
of Name)
and get that corresponding value inside conversion tag.
Any help is apprecited in advance
thanks,
Deepak
kr_deepak123@yahoo.co.in
kr_deepak123@hotmail.com
bruce barker - 07 Feb 2008 19:49 GMT
sorry, don't know vb. assuming you loaded the xml into an XmlDocument:
string name = "ER_Kista";
string converstion = "";
string path =
"//SXPDictionaryItemsGetResult/DictionaryItems/TimeZoneConverter[Name='{0}']/Conversion";
XmlNode node = xmldoc.SelectSingleNode(string.Format(path,name);
if (node != null)
conversion = node.Value;
-- bruce (sqlwork.com)
> Hi All,
>
[quoted text clipped - 39 lines]
> kr_deepak123@yahoo.co.in
> kr_deepak123@hotmail.com