function xml()
{
  this.dom;
  
  this.load = function(file)
  {
    if (window.ActiveXObject)
    {
      this.dom = new ActiveXObject("Microsoft.XMLDOM");
      this.dom.async = false;
      this.dom.load(file);
    }
    else if (document.implementation && document.implementation.createDocument)
    {
      this.dom = document.implementation.createDocument("","",null);
      this.dom.load(file);
    }
  }
  
  this.loadXML = function(string)
  {
    if (window.ActiveXObject)
    {
      this.dom = new ActiveXObject("Microsoft.XMLDOM");
      this.dom.async = false;
      this.dom.loadXML(string);
    }
    else
    {
      var parser=new DOMParser();
      this.dom = parser.parseFromString(string,"text/xml");
    }
  }
  
  this.hasNodeValue = function(node)
  {
    if(!node.nodeValue && (!node.childNodes || !node.childNodes.item(0).nodeValue))
    {
      return false;
    }
    return true;
  }
  
  this.getNodeValue = function(node)
  {
    return (node.nodeValue ? node.nodeValue : node.childNodes.item(0).nodeValue);
  }
  
  this.removeNode = function(node)
  {
    if(node.parentNode)
    {
      node.parentNode.removeChild(node);
    }
  }
}