Jump to content

HTML to XML/RSS Parser...?


euroiplayer

Recommended Posts

Hello everyone,

Can somebody help me out with this, I can't figure out how to do this.

I am trying to grab data from a HTML page and parse/grabb it into XML or RSS type page.


This would be the HTML for example...
[code]
                  <tr>
                                <td align="center" valign="top" width="150" bgcolor="FF9933" style="word-wrap: break-word">
                                    <a href="http://linkhere.com/index.cfm?id=33333829">
                                        name_here_1
                                    </a>
                                    <br>
                                    <br>
                                    <a href="http://linkhere.com/link">

                                        <img src="http://picturelink.com/picture.jpg" border="0"></a><br>
                                        <DIV style="width:80px;height:20px;"></div>
                                    <br>
                                    <br>
                                </td>
                                <td bgcolor="F9D6B4" align="left" valign="top" width="260" style="word-wrap: break-word">
                                    <span class="blacktext10">
                                        Jan 10 2007 5:42P
                                    </span>

                                    <br>
                                    <br>
                                    blah blah blah... text goes here... blah blah blah...

                                </td>
                            </tr>[/code]

This would be the output that data would be grabbed from HTML* and parsed into XML...
[code]
<?xml version="1.0" encoding="UTF-8"?>
<first_child>

<commentData>
<userID>33333829</userID>
<thumbnail>http://picturelink.com/picture.jpg</thumbnail>
<postedDate>Jan 10 2007 5:42P</postedDate>
<userName>name_here_1</userName>
<commentText>blah blah blah... text goes here... blah blah blah...</commentText>
</commentData>


</first_child> [/code]

If anybody could solve this for me would be great and I appreciate your help alot!

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/34858-html-to-xmlrss-parser/
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.