title: Looping through xml to get element/ node to update one element
body: <p>So I am trying to get a particular xml node of deductible from a string value of the full XML. I'm trying to replace the string inside of the node with a variable and I'm not having any luck doing it.</p>
  
  <p>The code bellow should supply what I have tried.</p>
  
  <pre><code> private String updateXMLDeductible(String Deductible, String xml) {
              try {
                  XmlHelper newxml = new XmlHelper();
                  Document doc = newxml.loadDoc(xml);
                  Node newel = null;
  
                  XPath xpath = new XPath("/location/location/deductible");
                  newel = (Node) xpath.selectSingleNode(doc);
                  newel.setTextContent(Deductible);
  }
  </code></pre>
  
  <p>The result Id like is to set the string value of deductible to my passed in deductible.</p>