Package org.dom4j

Examples of org.dom4j.Document.selectSingleNode()


            // baseTemplate.setId(doc.selectSingleNode("object-template/id").getStringValue());
            // }
            // catch(Exception e) {
            // // ignore
            // }
            baseTemplate.setType(doc.selectSingleNode("object-template/type").getStringValue());
            baseTemplate.setName(doc.selectSingleNode("object-template/name").getStringValue());
            try {
                baseTemplate.setDescription(doc.selectSingleNode("object-template/description").getStringValue());
            }
            catch(Exception e) {
View Full Code Here


            // }
            // catch(Exception e) {
            // // ignore
            // }
            baseTemplate.setType(doc.selectSingleNode("object-template/type").getStringValue());
            baseTemplate.setName(doc.selectSingleNode("object-template/name").getStringValue());
            try {
                baseTemplate.setDescription(doc.selectSingleNode("object-template/description").getStringValue());
            }
            catch(Exception e) {
                // ignore
View Full Code Here

            // // ignore
            // }
            baseTemplate.setType(doc.selectSingleNode("object-template/type").getStringValue());
            baseTemplate.setName(doc.selectSingleNode("object-template/name").getStringValue());
            try {
                baseTemplate.setDescription(doc.selectSingleNode("object-template/description").getStringValue());
            }
            catch(Exception e) {
                // ignore
            }
            try {
View Full Code Here

            }
            catch(Exception e) {
                // ignore
            }
            try {
                baseTemplate.setImage(doc.selectSingleNode("object-template/image").getStringValue());
            }
            catch(Exception e) {
                // ignore
            }
            baseTemplate.setLabelProperty(doc.selectSingleNode("object-template/label-property").getStringValue());
View Full Code Here

                baseTemplate.setImage(doc.selectSingleNode("object-template/image").getStringValue());
            }
            catch(Exception e) {
                // ignore
            }
            baseTemplate.setLabelProperty(doc.selectSingleNode("object-template/label-property").getStringValue());

            for(Object obj : doc.selectNodes("object-template/properties/object-property")) {
                logger.debug("obj: " + obj);

                if(obj instanceof Node) {
View Full Code Here

        throws Exception {
        String resultStr = "";

        try {
            Document doc = DocumentHelper.parseText(inXml);
            Node node = doc.selectSingleNode(targetName);
            resultStr = node.getText();
        } catch (Exception e) {
          new StrUtils().LOG.error(e.getMessage(), e);
        }
View Full Code Here

        return true;
      LinkedList<String> usrs = splitUsers(users.getStringValue().trim());
      if(usrs.size()==0||!usrs.contains(username))
        return false;
      Document udoc = new HUsers().getDocument();
      Element user = (Element) udoc.selectSingleNode("//user[@username='"+username+"']");
      if(user==null)
        return false;
      return password.equals(user.attributeValue("password"));
    } catch (Exception e){
      HLog.doclogger.error("Could not read users file properly",e);
View Full Code Here

        // Get creator
        ParentChildCreatorInterface creator = null;
        String absoluteDoctypesPath = publication.getDirectory() + File.separator + doctypesPath;
        Document doctypesDoc = new SAXReader().read("file:" + absoluteDoctypesPath +
                "doctypes.xconf");
        Attribute creator_src = (Attribute) doctypesDoc.selectSingleNode("/doctypes/doc[@type='" +
                doctype + "']/creator/@src");

        if (creator_src != null) {
            log.info("Creator found for \"" + doctype + "\": " + creator_src.getName() + " " + creator_src.getPath() + " " + creator_src.getValue());
View Full Code Here

                saxReader.setEncoding("UTF-8");
                Document pluginXML = saxReader.read(pluginConfig);

                // See if the plugin specifies a version of Openfire
                // required to run.
                Element minServerVersion = (Element)pluginXML.selectSingleNode("/plugin/minServerVersion");
                if (minServerVersion != null) {
                    String requiredVersion = minServerVersion.getTextTrim();
                    Version version = XMPPServer.getInstance().getServerInfo().getVersion();
                    String hasVersion = version.getMajor() + "." + version.getMinor() + "." +
                        version.getMicro();
View Full Code Here

                PluginClassLoader pluginLoader;

                // Check to see if this is a child plugin of another plugin. If it is, we
                // re-use the parent plugin's class loader so that the plugins can interact.
                Element parentPluginNode = (Element)pluginXML.selectSingleNode("/plugin/parentPlugin");

                String pluginName = pluginDir.getName();
                String webRootKey = pluginName + ".webRoot";
                String classesDirKey = pluginName + ".classes";
                String webRoot = System.getProperty(webRootKey);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.