Parse XML to find the min step #

hende

New member
Joined
Jun 20, 2005
Messages
3
Programming Experience
3-5
I have an XML message similar to this...
<Schedule>
<Step Id="3" Job="D:\Apps\CustomerNumber.exe" OnSuccess="2" OnFailure="QuitWithoutNotification" Action="Run"/>
<Step Id="2" Job="D:\Apps\RelationshipMgr.exe" OnSuccess="3" OnFailure="QuitWithoutNotification" Action="Skip"/>
<Step Id="1" Job="D:\Apps\PeopleSoft.exe" OnSuccess="4" OnFailure="QuitWithoutNotification" Action="Run"/>
<Step Id="4" Job="D:\Apps\AccountTeam.exe" OnSuccess="QuitWithoutNotification" OnFailure="QuitWithoutNotification" Action="Run"/>
</Schedule>

I go through each step to find the lowest possible ID, which is 1. How do I read the attributes from the step where Id = 1? I know how to do it from the first message but I want to start from where id = 1

Basically I want to be able to jump around the XML document and read the attributes from a certain Id that I choose in my code
 
Last edited:
hi,

from the Xml if you know what you want to retrieve use Xpath Queries.

It is a Best way to retrieve data from Xml files

May it help you ,

Thanks
Jay
 
Back
Top