Package org.dom4j

Examples of org.dom4j.DocumentFactory.createElement()


    return columnSizeXml;
  }

  public Element build()  {
    DocumentFactory factory=DocumentFactory.getInstance();
    Element tableAsNode=factory.createElement(new QName(WordprocessingML.TABLE_BODY_TAG_NAME, WordDocument.namespaceWord));


    Element tableProperties =tableAsNode.addElement(new QName(WordprocessingML.TABLE_PROPERTIES_TAG_NAME, WordDocument.namespaceWord));

    if (border==null) {
View Full Code Here


          </w:tr>
        <w:tc>
     */

    DocumentFactory factory=DocumentFactory.getInstance();
    Element lineAsXml=factory.createElement(new QName(WordprocessingML.TABLE_CELL_ROW, WordDocument.namespaceWord));

    // add the cells
    for (Iterator iter = cells.iterator(); iter.hasNext();) {
      TableCell element = (TableCell) iter.next();
      //add cell to table line
View Full Code Here

   *
   * @return
   */
  public Element build() {
    DocumentFactory factory=DocumentFactory.getInstance();
    Element paragraph=factory.createElement(new QName(WordprocessingML.PARAGRAPH_BODY_TAG_NAME, WordDocument.namespaceWord));
  //  Element paragraph=insertionPoint.addElement(new QName(WordprocessingML.PARAGRAPH_BODY_TAG_NAME, WordDocument.namespaceWord));

    // add paragraph properties
    addParagraphProperties( paragraph);

View Full Code Here

        for (Element operationElement : operationNodes)
        {
            Element inBody = (Element) operationElement.selectSingleNode("wsdl-dtc:input/wsdl-dtc:body");
            if (inBody != null)
            {
                Element message = factory.createElement("wsdl:message", WSDL_NS_URI);
                message.addAttribute("name", operationElement.attributeValue("name") + "In");
                List<Element> parts = inBody.selectNodes("wsdl-dtc:part");
                for (Element part : parts)
                {
                    message.addElement("wsdl:part", WSDL_NS_URI).addAttribute("name", part.attributeValue("name")).addAttribute("element", part.attributeValue("element"));
View Full Code Here

            }

            Element outBody = (Element) operationElement.selectSingleNode("wsdl-dtc:output/wsdl-dtc:body");
            if (outBody != null)
            {
                Element message = factory.createElement("wsdl:message", WSDL_NS_URI);
                message.addAttribute("name", operationElement.attributeValue("name") + "Out");
                List<Element> parts = outBody.selectNodes("wsdl-dtc:part");
                for (Element part : parts)
                {
                    message.addElement("wsdl:part", WSDL_NS_URI).addAttribute("name", part.attributeValue("name")).addAttribute("element", part.attributeValue("element"));
View Full Code Here

                if (!newDossierId.equals("none")) {
                    // ----------------------------------------------------
                    // insert new dossier element
                    // ----------------------------------------------------
                    dossierElement = factory.createElement("dossier");
                    dossierElement.add(factory.createAttribute(dossierElement, "id", newDossierId));
                    parent.add(dossierElement);

                    //------------------------------------
                    // new dossier file
View Full Code Here

                    } else {
                        log.error("\n--------------------------" + "\n- Parent node not found!" +
                            "\n--------------------------");
                    }

                    Element articleElement = factory.createElement("article");
                    articleElement.add(factory.createAttribute(articleElement, "channel",
                            articleChannel));
                    articleElement.add(factory.createAttribute(articleElement, "section",
                            articleSection));
                    articleElement.add(factory.createAttribute(articleElement, "year", articleYear));
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        DocumentFactory df = DocumentFactory.getInstance();
        Document doc = df.createDocument("UTF-8");
        doc.setRootElement(df.createElement("rootElement"));

        SimpleSerializedObject<Document> original = new SimpleSerializedObject<Document>(doc,
                                                                                         Document.class,
                                                                                         serializedType);
        SerializedObject<byte[]> actual = testSubject.convert(original);
View Full Code Here

        Element node;

        if (namespace != null) {
            QName qname = factory.createQName(localName, namespace);

            node = factory.createElement(qname);
        } else {
            node = factory.createElement(name);
        }

        addNewNode(node);
View Full Code Here

        if (namespace != null) {
            QName qname = factory.createQName(localName, namespace);

            node = factory.createElement(qname);
        } else {
            node = factory.createElement(name);
        }

        addNewNode(node);

        return node;
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.