Package org.sf.bee.commons.xml

Examples of org.sf.bee.commons.xml.XmlDocument


    void reload(LogWatchdogCallback sender, File file) {
        if (null == sender) {
            _logger.warning("Cannot call reload directly!");
            return;
        }
        XmlDocument document = null;
        try {
            document = new XmlDocument(file);
            this.initializeFromDocument(document, true);
        } catch (Throwable t) {
            _logger.log(Level.SEVERE, "Problem reloading configuration file.", t);
        }
    }
View Full Code Here


    }

    private void initialize(String xml) throws LogConfigurationException {
        StringReader reader = new StringReader(xml);
        InputSource source = new InputSource(reader);
        XmlDocument document = null;
        try {
            document = new XmlDocument(source);
        } catch (XmlParsingException ex) {
            throw new LogConfigurationException(ex.toString());
        }
        this.initializeFromDocument(document, false);
    }
View Full Code Here

        }
        this.initializeFromDocument(document, false);
    }

    private void initialize(File file) throws LogConfigurationException {
        XmlDocument document = null;
        try {
            document = new XmlDocument(file);
        } catch (XmlParsingException ex) {
            throw new LogConfigurationException(ex.toString());
        }
        this.initializeFromDocument(document, false);
    }
View Full Code Here

            if (_encoded) {
                content = BeeBase64.decode(text);
            } else {
                content = text.getBytes();
            }
            _document = new XmlDocument(content);
            final XmlNode root = _document.getDocumentElement();
            if (null != root) {
                _items = new ConfigurationNode(this, root);
            }
        }
View Full Code Here

    private Logger getLogger() {
        return LoggingUtils.getLogger(this);
    }

    private void initialize(File file) throws TaskConfigurationException {
        XmlDocument document = null;
        try {
            document = new XmlDocument(file);
        } catch (Exception ex) {
            this.getLogger().severe("Error parsing document: " + ex.getMessage());
            throw new TaskConfigurationException("Error parsing document: " + ex.getMessage());
        }
        if (null == document) {
            this.getLogger().severe("Invalid document: " + file.getAbsoluteFile());
            throw new TaskConfigurationException("Invalid document: " + file.getAbsoluteFile());
        }
        XmlNode documentRoot = document.getDocumentElement();
        if (null == documentRoot) {
            this.getLogger().severe("Invalid document root: " + file.getAbsoluteFile());
            throw new TaskConfigurationException("Invalid document root: " + file.getAbsoluteFile());
        }
View Full Code Here

TOP

Related Classes of org.sf.bee.commons.xml.XmlDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.