![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XPath for attributes with single and double quotes [Thread Next] Re: XPath for attributes with single and double quotesTo: NULL Date: 8/4/2004 4:02:00 PM In article <bd1c71f544187d108455c81937f02bb5@n...>, girish <girish.1ah25x@m...> wrote: >In my XML document, some node attributes data contains both single quote >and double quote characters [...] >I am not able to locate such elements using an XPath expression. Yes, annoying isn't it. You can't write an XPath string literal that contains both kinds of quote. You can construct the string by breaking it into pieces that use only one kind of quote, and concatenating them using concat: //*[@msg=concat('Hello "World", What', "'s up")] If you're using this expression in a XML attribute (e.g. in an XSLT stylesheet) you'll still need to escape whichever kind of quote is used for the attribute value. -- Richard | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
