title: Trying to replace XML element element using XDT and XPath locator
body: <p>Hi I am trying to replace the <code>&lt;cron-expression&gt;</code> using VS2012 XDT by using the following transform on a quartz.net job description file.  I have tested the XPath locator using an online tester and it returns 'what i think i need'.  Any help is appreciated.</p>
  
  <pre><code>&lt;schedule&gt;
      &lt;trigger&gt;
          &lt;cron xdt:Locator="XPath(//job-scheduling-data/schedule/trigger/cron[name='crontriggername2'])" &gt;
              &lt;cron-expression  xdt:Transform="Replace"&gt;***some data***&lt;/cron-expression&gt;
          &lt;/cron&gt;
      &lt;/trigger&gt;
  &lt;/schedule&gt;
  </code></pre>
  
  <p>for the sample XML file (Quartz.net)</p>
  
  <pre><code>  &lt;job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"&gt;&lt;processing-directives&gt;
      &lt;overwrite-existing-data&gt;true&lt;/overwrite-existing-data&gt;
  &lt;/processing-directives&gt;
  
  &lt;schedule&gt;
         &lt;trigger&gt;
          &lt;cron&gt;
              &lt;name&gt;crontriggername1&lt;/name&gt;
              &lt;group&gt;crontriggergroup1&lt;/group&gt;
              &lt;description&gt;crontriggerdesc1&lt;/description&gt;
              &lt;job-name&gt;crontriggerjobname1&lt;/job-name&gt;
              &lt;job-group&gt;crontriggerjgroup1&lt;/job-group&gt;
              &lt;misfire-instruction&gt;crontriggermisfile1&lt;/misfire-instruction&gt;
              &lt;cron-expression&gt;0/5 * * * * ?&lt;/cron-expression&gt;
          &lt;/cron&gt;
      &lt;/trigger&gt;
  
      &lt;trigger&gt;
          &lt;cron&gt;
              &lt;name&gt;crontriggername2&lt;/name&gt;
              &lt;group&gt;crontriggergroup2&lt;/group&gt;
              &lt;description&gt;crontriggerdesc2&lt;/description&gt;
              &lt;job-name&gt;crontriggerjobname2&lt;/job-name&gt;
              &lt;job-group&gt;crontriggerjgroup2&lt;/job-group&gt;
              &lt;misfire-instruction&gt;crontriggermisfile2&lt;/misfire-instruction&gt;
              &lt;cron-expression&gt;0/13 * * * * ?&lt;/cron-expression&gt;
          &lt;/cron&gt;
      &lt;/trigger&gt;      
  &lt;/schedule&gt;
  </code></pre>
  
  <p></p>
  
  <p>The XPath 
  //job-scheduling-data/schedule/trigger/cron[name='crontriggername2'] </p>
  
  <p>returns me the correct element group (<a href="http://www.freeformatter.com/xpath-tester.html" rel="nofollow noreferrer">http://www.freeformatter.com/xpath-tester.html</a><a href="https://stackoverflow.com/questions/7693837/log4net-config-transform">1</a>)</p>
  
  <pre><code>&lt;cron&gt;
    &lt;name&gt;crontriggername2&lt;/name&gt;
    &lt;group&gt;crontriggergroup2&lt;/group&gt;
    &lt;description&gt;crontriggerdesc2&lt;/description&gt;
    &lt;job-name&gt;crontriggerjobname2&lt;/job-name&gt;
    &lt;job-group&gt;crontriggerjgroup2&lt;/job-group&gt;
    &lt;misfire-instruction&gt;crontriggermisfile2&lt;/misfire-instruction&gt;
    &lt;cron-expression&gt;0/13 * * * * ?&lt;/cron-expression&gt;
  &lt;/cron&gt;
  </code></pre>
  
  <p>I based the expression on the solution to another XDT quesion on Log4net (<a href="https://stackoverflow.com/questions/7693837/log4net-config-transform">log4Net config transform</a>)</p>
  
  <p>Can anybody point me to a correct solution, this is driving me insane. Thanks in advance.</p>