SYNOPSISxmlNode xmlTreeNewAttribute(xmlNode parent, string name,
[, string content[, xmlNs ns]])
Parameters:
parent
- the xmlNode
to create the attribute onname
- the name of the new attributecontent
(optional) - the content for the attributens
(optional) - the namespace to use for the attribute
Returns:
xmlNode
for the new attribute
DESCRIPTIONxmlTreeNewAttribute()
creates a new attribute. Attribute names
must be unique, so if another attribute with the same name already
exists, the existing one will be unlinked.
EXAMPLE<$attr = (xmlTreeNewAttribute($element, 'id', '12345'))>
SEE ALSOxmlTreeNewElement
,
xmlTreeNewPI
,
xmlTreeNewText
,
xmlTreeNewCDATA
,
xmlTreeNewComment
,
xmlTreeNewNs