note 43728 added to ref.simplexml
| From: | rishad at kaluma dot com | Date: | Thu, 01 Jul 2004 13:12:57 +0000 |
| Subject: | note 43728 added to ref.simplexml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72261@lists.php.net to get a copy of this message | ||
To test whether a child node exists I used the following code:
function child_exists($xml, $childpath)
{
$result = $xml->xpath($childpath);
if (count($result)) {
return true;
} else {
return false;
}
}
----
Manual Page -- http://www.php.net/manual/en/ref.simplexml.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43728
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43728&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43728&report=yes
Search -- http://master.php.net/manage/user-notes.php