Sets the text attribute. @param text the text attribute
(final String text)
| 98 | * @param text the {@code text} attribute |
| 99 | */ |
| 100 | public void setText(final String text) { |
| 101 | DomNode firstChild = getFirstChild(); |
| 102 | if (firstChild == null) { |
| 103 | firstChild = new DomText(getPage(), text); |
| 104 | appendChild(firstChild); |
| 105 | } |
| 106 | else { |
| 107 | firstChild.setNodeValue(text); |
| 108 | } |
| 109 | } |
| 110 | } |
no test coverage detected