Package org.w3c.dom

Examples of org.w3c.dom.Document.createElement()


         //Document doc = new org.apache.crimson.tree.XmlDocument();
         Document doc = Global.instance().getDocumentBuilderFactory().newDocumentBuilder().newDocument();
  
         Element root = doc.createElement(rootnode);
         Element results = doc.createElement("results");
         Element desc = doc.createElement("desc");
  
         root.appendChild(desc);
         root.appendChild(results);
  
         ResultSetMetaData rsmd = rs.getMetaData();
View Full Code Here


         root.appendChild(results);
  
         ResultSetMetaData rsmd = rs.getMetaData();
         int               columns = rsmd.getColumnCount();

         Element       numColumns = doc.createElement("numcolumns");
         Text          numColumnsValue = doc.createTextNode("" + columns);

         numColumns.appendChild(numColumnsValue);
         desc.appendChild(numColumns);
View Full Code Here

         Text          numColumnsValue = doc.createTextNode("" + columns);

         numColumns.appendChild(numColumnsValue);
         desc.appendChild(numColumns);

         Element columnNames = doc.createElement("columnnames");

         for (int i = 1, j = columns; i <= j; i++) {
            columnName = rsmd.getColumnName(i);
            Element name = doc.createElement("column");
            Text        value = doc.createTextNode(columnName);
View Full Code Here

         Element columnNames = doc.createElement("columnnames");

         for (int i = 1, j = columns; i <= j; i++) {
            columnName = rsmd.getColumnName(i);
            Element name = doc.createElement("column");
            Text        value = doc.createTextNode(columnName);

            name.appendChild(value);
            columnNames.appendChild(name);
         }
View Full Code Here

               break;
            }

            rows++;

            Element row = doc.createElement(rownode);

            for (int i = 1, j = columns; i <= j; i++) {
               int      cType = rsmd.getColumnType(i);
               columnName = rsmd.getColumnName(i);
               String   columnValue = "";
View Full Code Here

                  columnValue = (o2==null) ? NULL_STR : o2.toString();
                  break;
               }

               if (log.isLoggable(Level.FINE)) log.fine("row="+ rows + ", columnName=" + columnName + ", type=" + cType + " columnValue='" + columnValue + "'");
               Element col = doc.createElement(columnName);
               CDATASection cvalue = doc.createCDATASection(columnValue);

               col.appendChild(cvalue);
               row.appendChild(col);
               results.appendChild(row);
View Full Code Here

               row.appendChild(col);
               results.appendChild(row);
            }
         }

         Element numRows = doc.createElement("rownum");
         Text        numRowsValue = doc.createTextNode("" + rows);
  
         numRows.appendChild(numRowsValue);
         desc.appendChild(numRows);
  
View Full Code Here

    */
   private Document createUpdateDocument(int rowsAffected, ConnectionDescriptor descriptor) throws XmlBlasterException
   {
      Document document = createEmptyDocument();

      Element root = (Element)document.createElement(descriptor.getDocumentrootnode());
      document.appendChild(root);
      Element row =  (Element)document.createElement(descriptor.getRowrootnode());
      root.appendChild(row);
      Text rows = (Text)document.createTextNode(rowsAffected + " row(s) were affected during the update.");
      row.appendChild(rows);
View Full Code Here

   {
      Document document = createEmptyDocument();

      Element root = (Element)document.createElement(descriptor.getDocumentrootnode());
      document.appendChild(root);
      Element row =  (Element)document.createElement(descriptor.getRowrootnode());
      root.appendChild(row);
      Text rows = (Text)document.createTextNode(rowsAffected + " row(s) were affected during the update.");
      row.appendChild(rows);
      return document;
   }
View Full Code Here

   */
  public Object execute(String function, Object callData) throws XException
  {
    Document retDocument = XMLHelper.getDocumentBuilder("Default",
        mDestination.getName()).newDocument();
    retDocument.appendChild(retDocument.createElement(mDestination
        .getName()));

    /*
     * Getting an instance of the LDAPConnection
     */
 
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.