PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I got the XPath.class.php class file and am using it and i can select single data easy but how can I select an array of matches?
Xpath->getData("/xml/*/headline")
gives me an error that there is more than one match(which there is ...but how can i make it return an array of nodes that match or something simillar?)
not sure how clear that was...its for a CMS news System
Where did you ge the XPath.class.php? What version of PHP are you using? If you're using PHP5 or greater you can use SimpleXML which has pretty good support for XPath and can certainly return multiple elements from a query.
Joran has the right idea, it's probably worth writing it yourself in SimpleXML (it's not hard, trust me) and you'll need to use a function called childNodes, which returns an array.