Skip to content

Instantly share code, notes, and snippets.

@technosophos
Created May 25, 2013 21:14
Show Gist options
  • Select an option

  • Save technosophos/5650812 to your computer and use it in GitHub Desktop.

Select an option

Save technosophos/5650812 to your computer and use it in GitHub Desktop.
Test case for #112
$xml = '<?xml version="1.0"?>
<root>
<Document name="A" title="A" >
<Document name="B" title="B" >
<Document name="C" title="C" >
<Section title="1" position="" >
Section ABDFD
</Section>
</Document>
</Document>
</Document>
</root>';
$qp = qp($xml, 'root');
foreach ($qp->children('Document') as $ele) {
foreach ($ele->children('Section') as $foo) {
throw \Exception("FAIL. Should not get here.");
}
}
print "YAY!";
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment