Get the names of all of the element's children, and returns the names as an array of Strings . This is the same as looping through and calling getName() on each child element individually. @webref xml:method @webBrief Returns the names of all children as an array
()
| 408 | * @webBrief Returns the names of all children as an array |
| 409 | */ |
| 410 | public String[] listChildren() { |
| 411 | // NodeList children = node.getChildNodes(); |
| 412 | // int childCount = children.getLength(); |
| 413 | // String[] outgoing = new String[childCount]; |
| 414 | // for (int i = 0; i < childCount; i++) { |
| 415 | // Node kid = children.item(i); |
| 416 | // if (kid.getNodeType() == Node.ELEMENT_NODE) { |
| 417 | // outgoing[i] = kid.getNodeName(); |
| 418 | // } // otherwise just leave him null |
| 419 | // } |
| 420 | checkChildren(); |
| 421 | String[] outgoing = new String[children.length]; |
| 422 | for (int i = 0; i < children.length; i++) { |
| 423 | outgoing[i] = children[i].getName(); |
| 424 | } |
| 425 | return outgoing; |
| 426 | } |
| 427 | |
| 428 | |
| 429 | /** |
nothing calls this directly
no test coverage detected