title: XML string manipulation in JS?
body: <p>I have an XML file in a string in this format:</p>
  
  <p></p>
  
  <pre><code>&lt;item&gt;
      &lt;name&gt;xxx&lt;/name&gt;
      &lt;id&gt;yyy&lt;/id&gt;
  
      &lt;view&gt;
          &lt;name&gt;view1_name&lt;/name&gt;
          &lt;view_attrs&gt;
              &lt;view_attr&gt;
                  &lt;name&gt;Age&lt;/name&gt;
                  &lt;values&gt;
                      &lt;value&gt;18-36&lt;/value&gt;
                      &lt;value&gt;55-70&lt;/value&gt;
                  &lt;/values&gt;
              &lt;/view_attr&gt;
              &lt;view_attr&gt;
                  &lt;name&gt;Status&lt;/name&gt;
                  &lt;values&gt;
                      &lt;value&gt;Single&lt;/value&gt;
                      &lt;value&gt;Married&lt;/value&gt;
                  &lt;/values&gt;
              &lt;/view_attr&gt;
          &lt;/view_attrs&gt;
      &lt;/view&gt;
  
  
      &lt;view&gt;
          &lt;name&gt;view2_name&lt;/name&gt;
          &lt;view_attrs&gt;
              &lt;view_attr&gt;
                  &lt;name&gt;Age&lt;/name&gt;
                  &lt;values&gt;
                      &lt;value&gt;37-54&lt;/value&gt;
                  &lt;/values&gt;
              &lt;/view_attr&gt;
          &lt;/view_attrs&gt;
      &lt;/view&gt;
  
  
      &lt;children&gt;
          &lt;item&gt;
          ...
          &lt;/item&gt;
          &lt;item&gt;
          ...
              &lt;children&gt;
              ...
              &lt;/children&gt;
          &lt;/item&gt;
      &lt;/children&gt;
  
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>What I would like to do for example, is add/delete an item, a child, change values in a specific view_attr and so on?</p>
  
  <p>What's the easiest and simplest method to do so?</p>
  
  <p>Thanks in advance. :)</p>