参考 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.

返回值

p5.XML: child element.

相关参考