Put the names of all children into an array. Same as looping through each child and calling getName() on each XMLElement. @webref xml:method @brief Returns the names of all children as an array
()
| 399 | * @brief Returns the names of all children as an array |
| 400 | */ |
| 401 | public String[] listChildren() { |
| 402 | // NodeList children = node.getChildNodes(); |
| 403 | // int childCount = children.getLength(); |
| 404 | // String[] outgoing = new String[childCount]; |
| 405 | // for (int i = 0; i < childCount; i++) { |
| 406 | // Node kid = children.item(i); |
| 407 | // if (kid.getNodeType() == Node.ELEMENT_NODE) { |
| 408 | // outgoing[i] = kid.getNodeName(); |
| 409 | // } // otherwise just leave him null |
| 410 | // } |
| 411 | checkChildren(); |
| 412 | String[] outgoing = new String[children.length]; |
| 413 | for (int i = 0; i < children.length; i++) { |
| 414 | outgoing[i] = children[i].getName(); |
| 415 | } |
| 416 | return outgoing; |
| 417 | } |
| 418 | |
| 419 | |
| 420 | /** |
nothing calls this directly
no test coverage detected