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.

Reading a xml element

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deepak - 11 Feb 2008 13:21 GMT
Hi All

i have a xmlelement saying  in_root which has outer and inner xml as shown
below:   

OuterXml   
"<SXPTaskUpdateOrAdd Revision=" 7.5.0 "
Source="ER_Kista"><Task><NOCRefID>Deepak_0208_1</NOCRefID><Customer>KPN-NL</Customer><Title>The
work order
title</Title><Priority>1</Priority><Status>Unassigned</Status><NewComment>last
comment only</NewComment><ContactName>Fredrik
Viberg</ContactName><ContactPhoneNumber>+46 730 51 38
96</ContactPhoneNumber><EstimatedDuration>36000</EstimatedDuration><EarlyStart>2006-02-03T00:00:00</EarlyStart><DesiredDueDate>2006-02-05T00:00:00</DesiredDueDate></Task></SXPTaskUpdateOrAdd>"

InnerXml

"<Task><NOCRefID>Deepak_0208_1</NOCRefID><Customer>KPN-NL</Customer><Title>The
work order
title</Title><Priority>1</Priority><Status>Unassigned</Status><NewComment>last
comment only</NewComment><ContactName>Fredrik
Viberg</ContactName><ContactPhoneNumber>+46 730 51 38
96</ContactPhoneNumber><EstimatedDuration>36000</EstimatedDuration><EarlyStart>2006-02-03T00:00:00</EarlyStart><DesiredDueDate>2006-02-05T00:00:00</DesiredDueDate></Task>"

i want to check through vb.net code tha t if this in_root has node
<EarlyStart> or not? similar checkfor <DesiredDueDate> also,,,how can i check
it ....

Kinldy tell me ..
i tried some of following ways but its giving me nothing in quick watch

xnodeDesiredDueDate = in_root.Item("DesiredDueDate")
xnodeEarlyStartDate = in_root.Item("EarlyStart")

xnodeDesiredDueDate =
in_root.SelectSingleNode("SXPTaskUpdateOrAdd/Task/DesiredDueDate")

xnodeEarlyStartDate =
in_root.SelectSingleNode("SXPTaskUpdateOrAdd/Task/EarlyStart")

Any help asap would be grealty helpful for me...

Thanks,
Deepak
kr_deepak123@yahoo.co.in
kr_deepak123@hotmail.com
deepak - 11 Feb 2008 13:41 GMT
k i got it using
Dim element As XmlElement = in_root.Item("Task")
           xnodeDesiredDueDate = element.Item("DesiredDueDate")

           xnodeEarlyStartDate = element.Item("EarlyStart")

thanks,

> Hi All
>
[quoted text clipped - 41 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.