HumzaKhan Posted June 19, 2012 Share Posted June 19, 2012 Hi there, I have a question that how can i count the child nodes of a XML File by using PHP? Like: <Videos> <Video> <Title>something</Title> </Video> <Video> <Title>nothing</Title> </Video> </Videos> So how can i count that How many times tag 'Video' occurs in the file? Looking forward for your help. Thankx in Advance.. Quote Link to comment https://forums.phpfreaks.com/topic/264426-how-can-i-count-the-child-nodes-in-a-xml-file-using-php/ Share on other sites More sharing options...
PeoMachine Posted June 19, 2012 Share Posted June 19, 2012 Try yo use the Count function of SimpleXML. simplexml Quote Link to comment https://forums.phpfreaks.com/topic/264426-how-can-i-count-the-child-nodes-in-a-xml-file-using-php/#findComment-1355166 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.