title: Invalid Token when using XPath
body: <p>I am making a modification to a web application using XPath, and when executed I get an error message - Invalid token!</p>
  
  <p>This is basic what I am doing</p>
  
  <pre><code>public xmlNode GetSelection (SelectParams params, xmldocument docment)
  
  {
  
      xpathstring = string.format("Name =\'{0}' Displaytag = \'{1}' Manadatory=\'{2}', params.Name, params.Displaytag, params.Manadatory);
  
      return document.selectsinglenode(xpathstring);
  
  }
  </code></pre>
  
  <p>As you can see, I am making a string and setting values on the nodes I am trying to find against my xml document, and thus returning xml data that matches my parameters.</p>
  
  <p>What is happening is that I am getting an xpathexeception error in Visual Studio and it says invalid token.</p>
  
  <p>I do know that in the xml document that the parameters I am looking in the tags have double quotes, for example, Name="ABC". So, I thought the problem could be solved using an "\".</p>
  
  <p>Can anyone help?</p>
  
  <p><strong>Update from comments</strong></p>
  
  <blockquote>
    <p>In the Xml Document, the tag has
    attributes where they are set as
    Name="ABC" Displaytag="ATag"
    Manadatory="true".</p>
  </blockquote>