PHP ActiveX
PHP ActiveX
SearchAllForContent
See more XML Examples
Demonstrates the SearchAllForContent method.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$xml = new COM("Chilkat.Xml");
$success = $xml->LoadXmlFile('qa_data/xml/pigs.xml');
if ($success != 1) {
print $xml->LastErrorText . "\n";
exit;
}
// xBeginAfter is a Chilkat.Xml
$xBeginAfter = $xml->GetSelf();
// xFound is a Chilkat.Xml
$xFound = $xml->SearchAllForContent($xBeginAfter,'*pig*');
$searchForMore = 1;
while (($searchForMore == 1)) {
print $xFound->Tag . "\n";
print $xFound->Content . "\n";
print '--' . "\n";
// xBeginAfter is a Chilkat.Xml
$xBeginAfter = $xFound;
// xFound is a Chilkat.Xml
$xFound = $xml->SearchAllForContent($xBeginAfter,'*pig*');
$searchForMore = $xml->LastMethodSuccess;
}
?>