DOMNode Attribute List

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!

Moderator: General Moderators

Post Reply
urza9814
Forum Newbie
Posts: 1
Joined: Sun Feb 08, 2009 4:14 pm

DOMNode Attribute List

Post by urza9814 »

I have code that utilizes the 'getAttribute()' method of the DOMNode class. The problem is, I need some way to iterate through all the attributes that the node has, and I can't seem to find documentation anywhere of any methods to get a list of attributes. Is there any way to do this?
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: DOMNode Attribute List

Post by susrisha »

use simplexml instead. it has a method Attributes that gives all the attributes of the node.
Post Reply