Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie question on selecting nodes

Status
Not open for further replies.

pmbtech

Programmer
Nov 24, 2003
47
US
Hello,
I am new to XPATH and am having a hard time selecting some nodes. I want to select all the record nodes where Status = 'Unprocessed' or 'Queued' (that part I can get) but additionally I only want the ones where the Field/Fieldname ='ChangeType' and Field/Value = 'SN'
Below is a snippet of the abbreviated XML doc:
<Extract>
<ExtractInfo>
<Status>UnProcessed</Status>
<Record>
<RecordNumber>1</RecordNumber>
<Status>UnProcessed</Status>
<Field>
<Fieldname>ChangeType</Fieldname>
<Value>SM</Value>
</Field>
</Record>
<Record>
<Record>
<RecordNumber>2</RecordNumber>
<Status>UnProcessed</Status>
<Field>
<Fieldname>ChangeType</Fieldname>
<Value>SN</Value>
</Field>
</Record>
<Record>
</ExtractInfo>
</Extract>

Any help would be graetly appreciated
 
Since you can select the appropriate <record> nodes that have the desried Status value, you can use a compound conditional in the predicate, i.e. and and or. Use parentheses as needed.

If you need additional help, please show us what you have tried.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top