Sets an attribute to a given value.
The first parameter, name
, is a string with the name of the attribute being set.
The second parameter, value
, is the attribute's new value. For example, calling myXML.setAttribute('id', 123)
sets the id
attribute to the value 123.
Examples
Syntax
setAttribute(name, value)
Parameters
name
String:
name of the attribute to be set.
value
Number|String|Boolean:
attribute's new value.
This page is generated from the comments in src/io/p5.XML.js . Please feel free to edit it and submit a pull request!