Documentation
getFirstChild
usage
$node = $nql->getFirstChild()
retourne
the first child of the selected node
exemples
include_once('../Kernel/common/nql.class.php');
$nql = new NQL();
$nql->addCommand(
'<SEARCH name="candidates">
<CONTACT>
<INFO>
<BIRTHDAY operator="GT">1979-01-01</BIRTHDAY>
</INFO>
</CONTACT>
</SEARCH>'
);
$nql->execute();
$resultNode = $nql->getElement('/RESPONSE/RESULTS[@name="candidates"]');
$first_candidate = $resultNode->getFirstChild();
$ID = $first_candidate->getAttribute('ID');
echo $ID; // prints "1857"