public Circuit decoder(String endroit){
        try {
            Circuit c = new Circuit();
            
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.parse(new InputSource(endroit));
            
            Element rootTest = doc.getDocumentElement();
            
            c.setAmpere(Double.parseDouble(rootTest.getAttribute("AMPERE")));
            c.modifier(Double.parseDouble(rootTest.getAttribute("VOLTAGE")));
            
            NodeList elemComp = rootTest.getElementsByTagName("COMPOSANTE");
            
            elemComp.getLength();
            
            Element comp = (Element)elemComp.item(0);
            
            NodeList para = comp.getElementsByTagName("PARALLELE");
            NodeList resis = comp.getElementsByTagName("RESISTANCE");
            
            for(int i = 0; i < para.getLength(); i++) {
                if(para.item(i).getParentNode().equals(comp))
                    c.ajouterComposante(ajouterParallele(((Element)para.item(i))));
            }
            for(int i = 0; i < resis.getLength(); i++) {
                if(resis.item(i).getParentNode().equals(comp))
                    c.ajouterComposante(ajouterComp((Element)resis.item(i)));
            }
            
            
            return c;
        } catch (ParserConfigurationException | SAXException | IOException ex) {
            Logger.getLogger(GestionXML.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }