Hi what is the best way to count the number of elements in a XML file? In my case I want to count the number of XML tags with the name "OfferName" within the tag "OfferNameList".

The XML below is contained in a php variable $offers

$offers = '<OfferNameList>
  <OfferName>...</OfferName>
  <OfferName>...</OfferName>
  <OfferName>...</OfferName>
  ...
</OfferNameList>';

Thanks for the help

Edit
Report