Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Easy: OR'ing an XPath Query

Posted on 2004-10-13
1
Medium Priority
?
193 Views
Last Modified: 2010-04-15
Is it valid to do something like

doc.SelectSingleNode("/MyDataSet/myNode[@attrib1="testing" OR @attrib2="testing2"]);

if so, is that the correct syntax?  
0
Comment
Question by:jjacksn
1 Comment
 
LVL 3

Accepted Solution

by:
a_goat earned 1000 total points
ID: 12301245
You just use "or" like you did (might have to be lower case).  You can use single quotes too to make your string cleaner.

Here's an awesome XPath reference:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmrefxpathexamples.asp
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question