/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function createW3CDOM( ){

    var oParser = new DOMImplementation();

    var ow3cDOMDoc = oParser.loadXML( );

    return ow3cDOMDoc;
}

function createElement(doc,tag){
    var element=doc.createElement(tag);
    return element;
}

function createTextValue(doc,value){
  var textnode=doc.createTextNode(value);
  return textnode;

}

function appendchild(parentTag,ChildTag){

    parentTag.appendChild(ChildTag);
}

function DocToString(doc){
  var docString=doc.toString()
  return docString;
}
function createArrayelement(doc,element){
    var no1=element.length;
    var tag=new Array();
    for(i=0;i<no1;i++){
        tag[i]=doc.createElement(element[i]);
    }
    return tag;
    }

function createArrayTextValue(doc,value){
    var no1=value.length;
    var textnode=new Array();
    for(i=0;i<no1;i++){
           textnode[i]=doc.createTextNode(value[i]);
    }
  return textnode;

}
function appendArraychild(parentTag,ChildTag){
    var no1=parentTag.length;
    for(i=0;i<no1;i++){
    parentTag[i].appendChild(ChildTag[i]);
    }
}
function appendArraychildtoroot(root,ChildTag){
    var no1=ChildTag.length;
    for(i=0;i<no1;i++){
    root.appendChild(ChildTag[i]);
    }
}

