Converting an img tag into a string and parsing out alt tag

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I need to create a class to convert the <img> tag into a string and parse
out the alt tag and create a caption out of it. I have no clue how to do
this. Please help!
Thanks in advance!
Bhagya
 
Bhagya said:
Hi,
I need to create a class to convert the <img> tag into a string and parse
out the alt tag and create a caption out of it. I have no clue how to do
this. Please help!
Thanks in advance!
Bhagya

Just a minor correction: what you are looking for are the 'alt' and
'src' *attributes* of the image tag.

This class that you are going to be passing the information to -- what
is it going to expect to receive? A DOM Node object? The image tag as a
string? The entire page as a string?

On top of that, what are you actually having a problem with?


Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top