I would like to know is there any php class available which parses an xml document and get all the attributes as an array from the document. The xml is not that big so we can use some DOM parser. I would appreciate if someone can shed some light or sample code would be good.