Package org.dom4j

Examples of org.dom4j.Branch.addElement()


    }

    @Override
    public void openTag(String tagName) {
        Branch top = stack.getLast();
        Element element = top.addElement(tagName);
        stack.addLast(element);
    }

    @Override
    public void openTag(String tagName, XMLAttributeList attributeList) {
View Full Code Here


    }

    @Override
    public void openTag(String tagName, XMLAttributeList attributeList) {
        Branch top = stack.getLast();
        Element element = top.addElement(tagName);
        stack.addLast(element);

        for (Iterator<XMLAttributeList.NameValuePair> i = attributeList.iterator(); i.hasNext();) {
            XMLAttributeList.NameValuePair pair = i.next();
            element.addAttribute(pair.getName(), pair.getValue());
View Full Code Here

    }

    @Override
    public void startTag(String tagName) {
        Branch top = stack.getLast();
        Element element = top.addElement(tagName);
        stack.addLast(element);
    }

    @Override
    public void addAttribute(String name, String value) {
View Full Code Here

        if (branch == null) {
            branch = getDocument();
        }

        Element element = branch.addElement(qName);

        // add all declared namespaces
        addDeclaredNamespaces(element);

        // now lets add all attribute values
View Full Code Here

/*     */
/* 239 */     if (branch == null) {
/* 240 */       branch = getDocument();
/*     */     }
/*     */
/* 243 */     Element element = branch.addElement(qName);
/*     */
/* 246 */     addDeclaredNamespaces(element);
/*     */
/* 249 */     addAttributes(element, attributes);
/*     */
View Full Code Here

  {
    //TODO: use methods instead of comments to segment this
    ComponentType comp = (ComponentType)t;
    Branch parent = (Branch)output; // Element or Document
   
    Element compElem = parent.addElement("DesignerComponent");

    writeHeader(comp, compElem);

    Attribute cdeModelIgnoreAttr = comp.tryGetAttribute("cdeModelIgnore");
    Attribute cdeModelPrefixAttr = comp.tryGetAttribute("cdeModelPrefix");
View Full Code Here

    PropertyType prop = (PropertyType)t;
    Branch parent = (Branch)output; // Element or Document

    boolean isAdvanced = PropertyType.CAT_ADVANCED.equals(prop.getCategory());

    Element propElem = parent.addElement("DesignerProperty");
    Element headerElem = propElem.addElement("Header");

    String defValue = prop.getDefaultValue();
    if("\"\"".equals(defValue))
    {
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.