MCPcopy Index your code
hub / github.com/benfry/processing4 / listChildren

Method listChildren

core/src/processing/data/XML.java:410–426  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 2

checkChildrenMethod · 0.95
getNameMethod · 0.45

Tested by

no test coverage detected