Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

xpath query and special characers

Avatar

Avatar
Validate 1
Level 2
broman__pl
Level 2

Likes

3 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
broman__pl
Level 2

Likes

3 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Boost 3
Boost 1
Affirm 1
View profile
broman__pl
Level 2

15-10-2015

I try to nodes with property that contains some text with special character like ? + and !

I have 4 nodes

/tmp/exclamation[@prop="value with!"]
/tmp/plus[@prop="value with+"]
/tmp/question[@prop="value with?"]
/tmp/string[@prop="value with string"]

/jcr:root/tmp//*[(jcr:contains(@prop, 'with') )] return me all 4 nodes
/jcr:root/tmp//*[(jcr:contains(@prop, 'with\!') )] return me all 4 nodes
/jcr:root/tmp//*[(jcr:contains(@prop, 'with\?') )] return me all 4 nodes
/jcr:root/tmp//*[(jcr:contains(@prop, 'with\+') )] return me all 4 nodes

How I should correctly escape ! + ? to get only node that mach my search criteria?