Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

xmlelement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deepak - 07 Feb 2008 18:26 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.