public static void UpdateExportFile(String profile, String genername, String exportfile)
	{
		File file = new File(profile);
		if (file.exists())
		{
			try
			{
				// Create a factory
		        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		        // Use the factory to create a builder
		        DocumentBuilder builder = factory.newDocumentBuilder();
		        Document doc = builder.parse(file);
		        doc.normalize();
		        
		        NodeList nodelist = doc.getElementsByTagName(GENERATOR);
		        if (nodelist.getLength() != 0)
		        {
		        	Element elem;
		        	for (int i = 0; i < nodelist.getLength(); i++)
		        	{
		        		elem = (Element)nodelist.item(i);
		        		//find the generator
		        		if (elem.getAttribute("name").equals(genername))
		        		{
		        			//find export file node
		        			nodelist = elem.getElementsByTagName(EXPORTFILE);
		        			if (nodelist.getLength() == 1)
		        			{
		        				elem = (Element)nodelist.item(0);
		        				if (elem.getFirstChild() != null)
		        					elem.getFirstChild().setNodeValue(exportfile);
		        				doc2XmlFile(doc, profile);
		        			}
		        		}	
		        	}
		        }
			}
			catch (Exception e)
			{
				System.out.println(e.toString());
				e.getStackTrace();
			}
		}
	}