레퍼런스 getChild()

getChild()

Returns the first matching child element as a new p5.XML object.

The parameter, name, is optional. If a string is passed, as in myXML.getChild('cat'), then the first child element with the tag <cat></cat> will be returned. If a number is passed, as in myXML.getChild(1), then the child element at that index will be returned.

예제

구문

getChild(name)

매개변수

name
String|Integer:

element name or index.

Returns

p5.XML: child element.
Notice any errors or typos? Please let us know. Please feel free to edit src/io/p5.XML.js and open a pull request!

관련 레퍼런스