DOM deals in elements, not tags. I think you have a couple of alternatives:
1) Work with the DOM hierarchy. Fetch a node that you're interested in, do whatever start processing you want, process any children you're interested in (possibly recursively), do whatever end processing you want, and then fetch another node. 2) Use SAX instead of DOM. SAX is event-based, with start and end events that are fired when you encounter start and end tags. The end event gets fired for empty-element tags as well as for end tags. -----Original Message----- From: Daniel Burrell [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2008 12:07 PM To: [email protected] Subject: Act on <open> </open> and <open/> Hey, I'm itterating through a DOMDocument. the 'current' DOMNode is given by 'node' What can I ask of node, to work out if I've got an <open> tag, or a <\open> tag. I want to act differently on opening and closing tags. something like if (node->isOpentag()) { //;} else {//;} also if I had <single/> would it recognise both open and close one after the other? Help much appreciated
