Appends a new child to the element. The child can be specified with either a String , which will be used as the new tag's name, or as a reference to an existing XML object. A reference to the newly created child is returned as an XML object. @webref xml:method @webB
(String tag)
| 581 | * @webBrief Appends a new child to the element |
| 582 | */ |
| 583 | public XML addChild(String tag) { |
| 584 | Document document = node.getOwnerDocument(); |
| 585 | Node newChild = document.createElement(tag); |
| 586 | return appendChild(newChild); |
| 587 | } |
| 588 | |
| 589 | |
| 590 | public XML addChild(XML child) { |
no test coverage detected