In this case, why not use:

...(root, "child::[EMAIL PROTECTED]'\"value'/@name");

Phil :n.
On Thu, 2005-02-17 at 09:44, Robert van Loenhout wrote:
Hi,

I just have a little xpath escape question for which I can't seem to 
find the answer.

How do I escape special characters in xpath to match attribute values?

For example

         Document doc = new DocumentImpl();
         Element root = doc.createElement("root");
         doc.appendChild(root);
         Element child = doc.createElement("element");
         child.setAttribute("name","\"value");
         root.appendChild(child);
         Node node = 
XPathAPI.selectSingleNode(root,"child::[EMAIL PROTECTED]""value\"]/@name");

The node will be null, so this is not the right way. What is?

TIA,
Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Phil Weighill-Smith <[EMAIL PROTECTED]>
Volantis Systems

Reply via email to