Class Quotes


  • public class Quotes
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Quotes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escape​(java.lang.String toEscape)
      Convert strings with both quotes and ticks into a valid xpath component For example,
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Quotes

        public Quotes()
    • Method Detail

      • escape

        public static java.lang.String escape​(java.lang.String toEscape)
        Convert strings with both quotes and ticks into a valid xpath component For example,

        foo will be converted to "foo",

        f"oo will be converted to 'f"oo',

        foo'"bar will be converted to concat("foo'", '"', "bar")

        Parameters:
        toEscape - a text to escape quotes in, e.g. "f'oo"
        Returns:
        the same text with escaped quoted, e.g. "\"f'oo\""