public void cargarXml(){ 
        //Se crea un SAXBuilder para poder parsear el archivo
        SAXBuilder builder = new SAXBuilder();
        File xmlFile = new File( "config.xml" );
        try
        {
            Document document = (Document)builder.build( xmlFile );
            Element rootNode = document.getRootElement();
            List list = rootNode.getChildren();

            for ( int i = 0; i < list.size(); i++ )
            {

                Element tabla = (Element) list.get(i);
                switch(tabla.getName()){
                    case "servidor":
                        this.setServidor(tabla.getValue());
                        break;
                    case "basededatos":
                        this.setBaseDeDatos(tabla.getValue());
                        break;    
                    case "puerto":
                        this.setPuerto(tabla.getValue());
                        break;    
                    case "usuario":
                        this.setUsuario(tabla.getValue());
                        break;
                    case "contrasena":
                        this.setContrasena(tabla.getValue());
                        break;    
                }
              
            }
        }catch ( IOException | JDOMException io ) {
            System.out.println( io.getMessage() );
        }
    }