Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XPath for attributes with single and double quotes

From: Peter Flynn <peter.no-sp@-.--------.-->
To: NULL
Date: 8/6/2004 8:13:00 PM
girish wrote:

> In my XML document, some node attributes data contains both single quote
> and double quote characters, such as
> 
> <input msg="Hello "World", What's up"/>.
> 
> The double quotes are in form of escape sequence in the XML document. I
> am not able to locate such elements using an XPath expression. I tried
> the following:
> 
> //*[@msg="Hello "World", What's up"]
> Failes with string error at double quote before World
> 
> //*[@msg='Hello "World", What's up']
> Failes with string error at single quote after What
> 
> //*[@msg="Hello "World", What's up"]
> I used the escpase sequence for double quote in my xpath which you are
> seeing as acutal double quote in this post.
> No Error but does not return any node.
> 
> //*[@msg="Hello "World", What's up"]
> I used the escpase sequence for both double quotes and single quotes in
> my xpath which you are seeing as acutal double quote and single quotesin
> this post
> No Error but does not return any node
> 
> I tried both MSXML 3.0 and MSXML 4.
> Any Ideas??

&quot; is your friend.

///Peter
-- 
"The cat in the box is both a wave and a particle"
      -- Terry Pratchett, introducing quantum physics in _The Authentic Cat_


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent