Solved

Xpath search for username?

Posted on 2011-09-27
2
238 Views
Last Modified: 2012-05-12
Given the XML file shown below, is there a way that I can write an xpath query that will search if a particular username exists?  Say 'jglazer"?   Should be case insensitive.

Thanks!
<Users>
  <User>
    <UserName>jglazer</UserName>
      </User>
  <User>
    <UserName>hiram</UserName>
      </User>
</Users>

Open in new window

0
Comment
Question by:jglazer63
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 36714407
//Users/User/UserName[text()="your text here"]

case insensitive is a bit tricky and the following link explains that
http://www.exampledepot.com/egs/org.w3c.dom/xpath_GetElemByText.html
0
 

Author Closing Comment

by:jglazer63
ID: 37083646
worked
0

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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