Documentation
setAttribute
usage
$NQL->setAttribute( string name , string value )
paramètres
name: name of the attribute to set
value: value to set in the attribute
exemples
include_once("../Kernel/common/nql.class.php");
$nql = new NQL(false);
$nql->addCommand('<GET name="item"><CONTACT ID="1857"/></GET>');
$nql->execute();
$birthday = $nql->getElement("/RESPONSE/RESULTS[@name='item']/CONTACT/INFO/BIRTHDAY");
$age = compute_age($birthday->valueOf());
$birthday->setAttribute('age', $age);
$nql->transform('IDCard.xsl');