private String getXMLValue()
    {
        FileInputStream fis = null;
        String value = "";
        try
        {
            fis = new FileInputStream(new File("D:/xml.xml"));
            Properties prop = new Properties();
            prop.loadFromXML(fis);
            value = prop.getProperty("foo");
        }
        catch(FileNotFoundException ex)
        {
            Logger.getLogger(Xml.class.getName()).log(Level.SEVERE, null, ex);
        }
        catch(IOException ex)
        {
            Logger.getLogger(Xml.class.getName()).log(Level.SEVERE, null, ex);
        }
        finally
        {
            try
            {
                fis.close();
            }
            catch(IOException ex)
            {
                Logger.getLogger(Xml.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return value;
    }