List of usage examples for org.w3c.dom Comment setNodeValue
public void setNodeValue(String nodeValue) throws DOMException;
From source file:com.wfreitas.camelsoap.SoapClient.java
private Element getClonePoint(Element element) { Comment comment; // Is it this element... comment = getCommentBefore(element); if (comment != null && comment.getNodeValue().endsWith(SOAPUI_CLONE_COMMENT)) { comment.setNodeValue(comment.getNodeValue() + CLONED_POSTFIX); return element; }//w w w .j a va 2 s.com // Is it the first child element of this element... Element firstChildElement = getFirstChildElement(element); if (firstChildElement != null) { comment = getCommentBefore(firstChildElement); if (comment != null && comment.getNodeValue().endsWith(SOAPUI_CLONE_COMMENT)) { comment.setNodeValue(comment.getNodeValue() + CLONED_POSTFIX); return firstChildElement; } } return null; }
From source file:com.wfreitas.camelsoap.SoapClient.java
private void resetClonePoint(Element clonePoint) { Comment comment = getCommentBefore(clonePoint); if (comment == null) { throw new IllegalStateException("Call to reset a 'clonePoint' that doesn't have a comment before it."); }/* ww w. j av a2s .co m*/ String commentText = comment.getNodeValue(); if (!commentText.endsWith(CLONED_POSTFIX)) { throw new IllegalStateException( "Call to reset a 'clonePoint' that doesn't have a proper clone comment before it."); } comment.setNodeValue(commentText.substring(0, commentText.length() - CLONED_POSTFIX.length())); }