Reference setName()

setName()

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

Examples

Syntax

setName(name)

Parameters

name

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!

Related References