0 Replies Latest reply on Oct 15, 2015 7:29 PM by broman__pl

    xpath query and special characers

    broman__pl Level 1

      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?