Package org.w3c.dom

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


      Element widthNode = document.createElement("width");
      Element heightNode = document.createElement("height");
      propertyNode.appendChild(widthNode);
      propertyNode.appendChild(heightNode);
      widthNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getWidth())));
      heightNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getHeight())));
    } else {
      Point point = (Point) value;

      Element xNode = document.createElement("x");
      Element yNode = document.createElement("y");
View Full Code Here


      Element xNode = document.createElement("x");
      Element yNode = document.createElement("y");
      propertyNode.appendChild(xNode);
      propertyNode.appendChild(yNode);
      xNode.appendChild(document.createTextNode(String.valueOf(point.x)));
      yNode.appendChild(document.createTextNode(String.valueOf(point.y)));
    }
  }
}
View Full Code Here

      Element xNode = document.createElement("x");
      Element yNode = document.createElement("y");
      propertyNode.appendChild(xNode);
      propertyNode.appendChild(yNode);
      xNode.appendChild(document.createTextNode(String.valueOf(point.x)));
      yNode.appendChild(document.createTextNode(String.valueOf(point.y)));
    }
  }
}
View Full Code Here

    {
        final Document document = createDocument();
        final String name = "meep";
        final String value = "text";
        final Element element = document.createElement( name );
        final Text text = document.createTextNode( value );
        element.appendChild( text );
        final Configuration configuration = ConfigurationUtil.toConfiguration( element );

        assertEquals( "configuration.getName()", name, configuration.getName() );
        assertEquals( "configuration.getPath()",
View Full Code Here

    {
        final Document document = createDocument();
        final String name = "meep";
        final String value = "text";
        final Element element = document.createElement( name );
        final Text text = document.createTextNode( value );
        element.appendChild( text );
        final Text text2 = document.createTextNode( value );
        element.appendChild( text2 );
        final Configuration configuration = ConfigurationUtil.toConfiguration( element );
View Full Code Here

        final String name = "meep";
        final String value = "text";
        final Element element = document.createElement( name );
        final Text text = document.createTextNode( value );
        element.appendChild( text );
        final Text text2 = document.createTextNode( value );
        element.appendChild( text2 );
        final Configuration configuration = ConfigurationUtil.toConfiguration( element );

        assertEquals( "configuration.getName()", name, configuration.getName() );
        assertEquals( "configuration.getPath()",
View Full Code Here

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

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

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

         Element columnNames = doc.createElement("columnnames");
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

               results.appendChild(row);
            }
         }

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

      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

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.