Jump to content

Need some help with DOM


AHA7

Recommended Posts

Hello,

 

Say, that I have an HTML page with many tables and with each table has a unique class (styling) for its rows that is different from other tables'. I use the dom class (DomDocument()) to load the HTML page for other purposes but it would be nice if I could achieve this using dom functions as follows:

 

I want to get the attribute class (its value) of the first, and only the first, childnode (<tr>) of each table on the page. Note: each <tr> element in all tables has its own class attribute with unique value to each table. All the rows (<tr>'s) of the same table has the same value for their class attribute.

 

How can I do that?

Link to comment
https://forums.phpfreaks.com/topic/53373-need-some-help-with-dom/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.