By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,872 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,872 IT Pros & Developers. It's quick & easy.

php5 XML collection size without looping?

P: n/a
Does anyone know if there is a method or property in php5 that provides the
collection size in XML processing? For example,

$collection=$doc->getElementsByTagName("someTag");

where one can get the size of the $collection without looping it? Thanks
May 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On May 22, 4:27 am, "Peter Parker" <spider...@home.comwrote:
Does anyone know if there is a method or property in php5 that provides the
collection size in XML processing? For example,

$collection=$doc->getElementsByTagName("someTag");

where one can get the size of the $collection without looping it? Thanks
According to the manual getElementsByTagName returns a DOMNodeList
object. Also, according to the manual, DOMNodeList has a property
called "length." So, in short, read the manual.

May 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.