Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XPath SelectSingleNode query with quotes problem. [Thread Next] Re: XPath SelectSingleNode query with quotes problem.To: NULL Date: 5/8/2008 5:48:00 PM
Minerva Jones wrote:
> I've got a problem reading in and searching through data where the
> attributes might contain both single and/or double quotes. As they get
> inserted into an XmlDocument, they get marked up with " and
> ' properly (which I can tell by looking at OuterXML), but then
> using xPath to search for them is proving to be inconsistent. It's
> like I can only write code that works for either double or single
> quotes at time, depending on what I use to surround the data in the
> query in the first place.
If you need both single and double quote in a string literal then you
have two choices, either implement variables or split the string into
sections where you use single and double quotes e.g.
concat("Hello 'Word', Hello ", '"Word"')
I think http://www.codeplex.com/Wiki/View.aspx?ProjectName=MVPXML
provides variable resolution.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
