title: How to add two Namespaces to an Element using XMLService?
body: <p>I need to create an XML Element as follows using XMLService:</p>
  <pre><code>&lt;serv:message xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
                xmlns:serv=&quot;http://www.webex.com/schemas/2002/06/service&quot;&gt;
  </code></pre>
  <p>I know I can add one namespace using the following Google Apps Script code, but how do I add two namespaces?</p>
  <pre><code>  var ns = XmlService.getNamespace(&quot;serv&quot;, &quot;http://www.webex.com/schemas/2002/06/service&quot;);
    var root = XmlService.createElement(&quot;message&quot;, ns);
    root.setNamespace(ns);
  </code></pre>