title: Node.js XML builder Error: Invalid character in name: during creation of XML document
body: <p>I am trying to create the XML file using the <code>node.js</code> and npm package <code>xmlbuilder</code>. When I am trying to create the tags I have some special characters such as <code>: / etc</code> due to which I am getting the following error:
  <code>Error: Invalid character in name: http://google.com.http://google.com</code></p>
  <p>How can I resolve this issue. I can replace it with the blank but I don't want to do that I want my XML to retain these special characters.</p>
  <pre><code>var root        =   builder.create('test:document')
  var ObjectEvent =   root.ele('ObjectEvent')
  
  for(var ex=0; ex&lt;Extension.length; ex++)
  {
      Extension[ex].NameSpace     =   Extension[ex].NameSpace;
      Extension[ex].LocalName     =   Extension[ex].LocalName;
      Extension[ex].FreeText      =   Extension[ex].FreeText;
      ObjectEvent.ele(Extension[ex].NameSpace+Extension[ex].LocalName,Extension[ex].FreeText).up()
  }
  ObjectEvent.ele(Extension[ex].NameSpace+'.'+Extension[ex].LocalName,Extension[ex].FreeText).up()
  </code></pre>
  <p>My <code>Extension</code> elements would look something like this;</p>
  <pre><code>[
    {
      NameSpace: 'http://google.com',
      LocalName: 'http://google.com',
      ExtensionVlaues: 0,
      FreeText: 'Google Website',
      '$$hashKey': 'object:290'
    }
  ]
  </code></pre>
  <p>I wanted to know how can I retain all the special characters in my XML document</p>