title: Invalid XPath expression exception due to presence of apostrophe in name
body: <p>I am getting Invalid Xpath Exception for following code.</p>
  
  <pre><code>current.Name = current.Name.replace("'", "\'");
  System.out.println(current.Name );
  String xp1 = "//page[@name='"+current.Name+"']" ;
  Element n = (Element) oDocument.selectSingleNode(xp1+"/Body/contents");
  </code></pre>
  
  <p>Exception occurs when the string in current.name has an apostrophe in it</p>
  
  <p>current.name:  "Répartition par secteur d'activité"</p>
  
  <p>Error Message</p>