I try to select multiple "td" inside "tr" in a complicated table structure.
$name = $sxml->xpath("
//table[@cellspacing=0 and @cellpadding=2 and @class='mn2']
/tr[not(contains(@class, 'mn'))]/td[2]
|
//table[@cellspacing=0 and @cellpadding=2 and @class='mn2']
/tr[not(contains(@class, 'mn'))]/td[5]
|
//table[@cellspacing=0 and @cellpadding=2 and @class='mn2']
/tr[not(contains(@class, 'mn'))]/td[7]
");
everything is working fine, and i get what i want, but this seems a bit overkill. How can i select multiple "td" like this "td[2,5,7]" instead of using Union expression "|" ?