AnsweredAssumed Answered

Generic xpath name escaping

Question asked by deas0815 on Nov 19, 2007
Latest reply on Dec 7, 2007 by deas0815
Hallo everybody,

i just ran into an xpath problem.

Trying to obtain a node using

String path = "app:company_home/cm:something/cm:062006180-01.pdf";
Node otherNode = node.getNode(path);

failed due to

Caused by: org.jaxen.XPathSyntaxException: Unexpected '062006180'

This happens when I try to update a node with the name "062006180-01.pdf".

Seems like the dash is interpreted as an operator.

What would be the suggested way to escape a name in general ?

thanks
Andreas

Outcomes