Groups | Blog | Home
all groups > dotnet xml > august 2004 >

dotnet xml : Complex xPath Query


DotNetJunkies User
8/3/2004 2:36:52 PM
I am trying to build a xPath Query to use on SelectNodes function in VB.net

The data I want to search is by
MemberCity = O'Fallon

My xPath Query is

xPathQuery = "Matched[@MemberCity='O'Fallon']"

The problem is the apostrophe in the city name that is failing. How do I build the xPathQuery so that it can take into account the apostrophe

Any idea(s)

thanks


---
Posted using Wimdows.net NntpNews Component -

Derek Harmon
8/3/2004 8:01:46 PM
[quoted text, click to view]

You have a choice of what quote delimiter to use. Try this,

string xPathQuery = "Matched[@MemberCity=\"O'Fallon\"]";


Derek Harmon

AddThis Social Bookmark Button