List of usage examples for org.w3c.dom Document setNodeValue
public void setNodeValue(String nodeValue) throws DOMException;
From source file:org.eurekastreams.server.service.actions.DocumentCreatorFake.java
/** * Returns a dummy document./*from w w w . j a v a 2s. co m*/ * * @param inFileName * the name of the file * @return an xml document. * @throws Exception * Thrown when cannot create the xml document. */ public Document execute(final String inFileName) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document xmlDoc = db.newDocument(); xmlDoc.createElement("Title"); xmlDoc.setNodeValue("theme title"); xmlDoc.createElement("Description"); xmlDoc.setNodeValue("theme description"); xmlDoc.createElement("AuthorName"); xmlDoc.setNodeValue("author name"); xmlDoc.createElement("AuthorEmail"); xmlDoc.setNodeValue("author email"); return xmlDoc; }
From source file:org.mule.transport.soap.axis.style.DefaultMessageService.java
public Document document(Document body) { // Echo back/*from w w w. ja v a 2s. c o m*/ logger.debug("documentTest Called"); body.setNodeValue("TEST RESPONSE"); return body; }