I am working with XML that has a node titled <SCOPE>.
If the Scope is equal to "teaching," the code follows one path; if the Scope is not equal to "teaching," the code follows another path. I would like to also check to see if Scope is equal to either.
Is this possible in using a variable?
Here is my code (below). However, this returns no results, whereas using the separate values (either "Teaching" or "Scholarship/Research" return values).
$strXpathVar = "Teaching|Scholarship/Research"; $xml_awards_honor_scope_all = $xml_award_honor[0]->xpath('a:AWARDHONOR[a:SCOPE="'.$strXpathVar.'"]');
'a:AWARDHONOR[a:SCOPE="Teaching" or a:SCOPE="Scholarship/Research"]'