|
-
May 30th, 2008, 05:24 AM
#1
Thread Starter
Lively Member
Help me. Parsing html documents with php
Hello,
I need to parse html documents to get "values" of all html tags and their attributes like if I have:
<a href="url_here" title="title_here"> text_here </a>
Then I need 3 values of:
array(
'href' => 'url_here',
'title' => 'title_here',
'tag_value' => 'text_here'
);
How to do this?
Please let me know. If possible please give me some code.
regards
Thank you 
-
May 30th, 2008, 07:25 AM
#2
Re: Help me. Parsing html documents with php
You could use the DOM Extension to load the HTML document into a DOM tree and then traverse that through code.
-
Jun 1st, 2008, 12:56 PM
#3
Re: Help me. Parsing html documents with php
Are you looking to do this for all tags or just selective tags as listed above?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|