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
String:

new tag name of the element.

This page is generated from the comments in src/io/p5.XML.js . Please feel free to edit it and submit a pull request!

Related References