public void loadConfiguration(String pathToFile) throws XMLStreamException, FileNotFoundException {
        try {
            Document doc = dBuilder.parse(new File(pathToFile));
            doc.getDocumentElement().normalize();
            
            Main.enabled = Boolean.valueOf(doc.getElementsByTagName("enabled").item(0).getTextContent());
            Main.random = Boolean.valueOf(doc.getElementsByTagName("random").item(0).getTextContent());
            
            Main.interval = Integer.valueOf(doc.getElementsByTagName("interval").item(0).getTextContent());
            
            Main.prefix = new Message(doc.getElementsByTagName("prefix").item(0).getTextContent());
            
            for (int i = 0; i < doc.getElementsByTagName("message").getLength() ; i++) {
                Node messageNode = doc.getElementsByTagName("message").item(i);
                if(messageNode.getNodeType() == Node.ELEMENT_NODE) {
                    Element e = (Element) messageNode;
                    
                    //Define message-text
                    String text = "";
                    text = e.getElementsByTagName("text").item(0).getTextContent();
                    
                    //Define realTime-array
                    List<String> realTime = new ArrayList<String>();
                    for (int j = 0; j < e.getElementsByTagName("realTime").getLength(); j++) {
                        realTime.add(e.getElementsByTagName("realTime").item(j).getTextContent());   
                    }
                    
                    //Output Message
                    if(realTime.size() > 0) {
                        Message output = new Message(text, realTime);
                        Main.realTimeMessages.add(output);
                    } else {
                        Message output = new Message(text);
                        Main.messages.add(output);
                    }
                }
             }
            
        } catch (SAXException ex) {
            Logger.getLogger(xmlConfigurationManager.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(xmlConfigurationManager.class.getName()).log(Level.SEVERE, null, ex);
        }
    }