Examples of attributeValue()


Examples of org.dom4j.Element.attributeValue()

          File conf = new File(catalinaBase, "conf");
          File serverXML = new File(conf, "server.xml");
          SAXReader reader = new SAXReader();
          Document doc = reader.read(serverXML);
          Element serverElement = (Element) doc.selectSingleNode("/Server");
          String serverPort = serverElement.attributeValue("port", "8005");
          String shutdownCommand = serverElement.attributeValue("shutdown", "SHUTDOWN");
         
          // send shutdown command to specified port
          Socket socket = new Socket();
          socket.connect(new InetSocketAddress("127.0.0.1", Integer.parseInt(serverPort)), 1000);
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

          File serverXML = new File(conf, "server.xml");
          SAXReader reader = new SAXReader();
          Document doc = reader.read(serverXML);
          Element serverElement = (Element) doc.selectSingleNode("/Server");
          String serverPort = serverElement.attributeValue("port", "8005");
          String shutdownCommand = serverElement.attributeValue("shutdown", "SHUTDOWN");
         
          // send shutdown command to specified port
          Socket socket = new Socket();
          socket.connect(new InetSocketAddress("127.0.0.1", Integer.parseInt(serverPort)), 1000);
          socket.setSoTimeout(5000);
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

     * @return true if the field was removed.
     */
    public boolean removeField(String variable) {
        for (Iterator it = element.elementIterator("field"); it.hasNext();) {
            Element field = (Element) it.next();
            String fieldVariable = field.attributeValue("var");
            if (variable.equals(fieldVariable)) {
                return element.remove(field);
            }
        }
        return false;
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

     * @return the language code of the text description, if it exists.
     */
    public String getTextLang() {
        Element textElement = element.element("text");
        if (textElement != null) {
            return textElement.attributeValue(QName.get("lang", "xml",
                        "http://www.w3.org/XML/1998/namespace"));
        }
        return null;
    }

View Full Code Here

Examples of org.dom4j.Element.attributeValue()

    public static Element getChild(Element parent, String tagName, String attribute, String attributeValue) {
        Element childElement = null;
        Iterator iterator = parent.elements(tagName).iterator();
        while (iterator.hasNext() && childElement == null) {
            childElement = (Element) iterator.next();
            String actualValue = childElement.attributeValue(attribute);
            if (!attributeValue.equals(actualValue)) {
                childElement = null;
            }
        }
        return childElement;
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

        List<Element> children = new ArrayList<Element>();

        Iterator iterator = parent.elements(tagName).iterator();
        while (iterator.hasNext()) {
            Element childElement = (Element) iterator.next();
            String actualValue = childElement.attributeValue(attribute);
            if (attributeValue.equals(actualValue)) {
                children.add(childElement);
            }
        }
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

    public static Element getChild(Element parent, String attribute, String attributeValue) {
        Element childElement = null;
        Iterator iterator = parent.elements().iterator();
        while (iterator.hasNext() && childElement == null) {
            childElement = (Element) iterator.next();
            String actualValue = childElement.attributeValue(attribute);
            if (!attributeValue.equals(actualValue)) {
                childElement = null;
            }
        }
        return childElement;
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

        List<Element> children = new ArrayList<Element>();

        Iterator iterator = parent.elements().iterator();
        while (iterator.hasNext()) {
            Element childElement = (Element) iterator.next();
            String actualValue = childElement.attributeValue(attribute);
            if (attributeValue.equals(actualValue)) {
                children.add(childElement);
            }
        }
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

        {
            Element element = (Element)it.next();
            element.addAttribute(
                    "name",
                    StringUtils.replace(
                            element.attributeValue("name"),
                            "%module%",
                            this.getProjectName()));
        }
        return document;
    }
View Full Code Here

Examples of org.dom4j.Element.attributeValue()

    List list = actEl.selectNodes(StarFlowNames.ACT_OPERATION);
    Iterator iter=list.iterator();
        while(iter.hasNext()){
            Element el = (Element)iter.next();
            OperationElement opXml = new OperationElement();
            opXml.setId(el.attributeValue(StarFlowNames.ACT_OPERATION_ID));
            opXml.setName(el.attributeValue(StarFlowNames.ACT_OPERATION_NAME));
            opXml.setCode(el.attributeValue(StarFlowNames.ACT_OPERATION_CODE));
            opXml.setAction(el.attributeValue(StarFlowNames.ACT_OPERATION_ACTION));
            operationXmls.add(opXml);
        }
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.