public static void readMessage(String input, Core output) {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder;
        Document xmlFile = null;
        try {
            builder = factory.newDocumentBuilder();
            xmlFile = builder.parse(new InputSource(new StringReader(input)));
        } catch (Exception e) {
            System.out.println(ERROR_EN_EL_XML);
            return;
        }
        String rootName = xmlFile.getDocumentElement().getNodeName();
        XmlMessage type = null;
        for (XmlMessage m : XmlMessage.values()) {
            if (m.equals(rootName)) {   //Identifies type of message
                type = m;
                break;
            }
        }
        if (type == null) return;
        else
            try {
                readMessageAux(output, xmlFile, type);
            } catch (Exception e) {
                e.printStackTrace();
                System.out.println(ERROR_EN_FORMATO_DEL_XML);
            }
    }