private static double readValueFromURL(String url) throws IOException {
        URL oracle = new URL(url);
        BufferedReader in = new BufferedReader(
                new InputStreamReader(oracle.openStream()));

        String inputLine;
        String filetext="";
        while ((inputLine = in.readLine()) != null) {
            //System.out.println(inputLine);
            //System.out.println();
            filetext=filetext+"\n"+inputLine;
        }
        filetext=filetext.replace(">", ">\n");
        filetext=filetext.replace("/>", "/>\n");
        //System.out.println(filetext);
        String[] lines = filetext.split("\n");
        String result="";
        for(String line : lines)
        {
            //System.out.println(line);

            if(line.contains("BidCos-RF.LEQ0150716:2.ENERGY_COUNTER"))
            {
                //System.out.println(line);
                String[] vv = line.split("'");
                String oldv="";
                for(String v : vv)
                {
                    if(oldv.equals(" value="))
                    {
                        result=v;
                    }
                    oldv=v;
                }
            }

        }
        in.close();
        //System.out.println(result);
        Double value = Double.parseDouble(result);
        return value;
    }