cancel
Showing results for 
Search instead for 
Did you mean: 

Generic xpath name escaping

deas0815
Star Contributor
Star Contributor
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
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
I think you want the class: org.alfresco.util.ISO9075

deas0815
Star Contributor
Star Contributor
Yes, indeed - thanks kevin !
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.