public void CreateReplicaLink(XmlNode parent, XmlNode replica, 
			                      XmlNode from, XmlNode to, 				           //interface nodes
			                      String linkname, String ref1name, String ref2name,  
			                      float delay, float bandwidth)
	{
		if (parent == null || from == null || to == null)
		return;
		
		XmlNode link = new XmlNode(XmlNodeType.NODE, linkname);
		link.setAttribute(TYPE, NODE_TYPE_LINK);
		parent.addChild(link);
		
		XmlNode bitratelem = new XmlNode(XmlNodeType.ATTR, BANDWIDTH);
		DecimalFormat df = new DecimalFormat("########");
		bitratelem.setAttribute(VALUE, df.format(bandwidth));
		link.addChild(bitratelem);
		
		XmlNode delayelem = new XmlNode(XmlNodeType.ATTR, DELAY);
		df = new DecimalFormat("#.#####");
		delayelem.setAttribute(VALUE, df.format(delay));
		link.addChild(delayelem);
		
		XmlNode ref1 = new XmlNode(XmlNodeType.REF, ref1name);
		XmlNode ref2 = new XmlNode(XmlNodeType.REF, ref2name);
		link.addChild(ref1);
		link.addChild(ref2);
		
		String path1 = tree.getPath(ref1, from);		
		String path2 = tree.getPath(ref2, replica);
		path2 += ":" + to.parent.name + ":" + to.name;
		
		ref1.setAttribute(PATH, path1);
		ref2.setAttribute(PATH, path2);
		
		tree.addLink(link);
	}