Sets the element's tag name.
An XML element's name is given by its tag. For example, the element <language>JavaScript</language>
has the name language
.
The parameter, name
, is the element's new name as a string. For example, calling myXML.setName('planet')
will make the element's new tag name <planet></planet>
.
示例
语法
setName(name)
参数
name
String:
new tag name of the 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!