2 Replies - 7053 Views - Last Post: 12 November 2010 - 02:04 AM Rate Topic: -----

#1 Sergio Tapia   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1258
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Help using HtmlAgilityPack and selecting text inside of <p>

Posted 13 June 2010 - 07:05 PM

<div id="main">

<style type="text/css">
</style>

<script language="Javascript">    
</script>
<p style="margin: 0pt 0pt 0.5em;"><b>Media from&nbsp;<a onclick="(new Image()).src='/rg/find-media-title/media_strip/images/b.gif?link=/title/tt0087538/';"<--!I NEED THIS!!!! --> href="/title/tt0087538/">The Karate Kid</a> (1984)</b></p>
<style type="text/css">    
</style>

<table style="border-collapse: collapse;">
</table>
</div>



I need to somehow extract the href value of the (new Image()). How exactly would I accomplish this with HtmlAgilityPack?

I'm new to it, and so far I haven't found a useful tutorial on how to effectively use it for parsing.

Thanks for the help!

Is This A Good Question/Topic? 0
  • +

Replies To: Help using HtmlAgilityPack and selecting text inside of <p>

#2 Guest_Vin*


Reputation:

Re: Help using HtmlAgilityPack and selecting text inside of <p>

Posted 12 November 2010 - 01:06 AM

View PostSergio Tapia, on 13 June 2010 - 06:05 PM, said:

<div id="main">

<style type="text/css">
</style>

<script language="Javascript">    
</script>
<p style="margin: 0pt 0pt 0.5em;"><b>Media from&nbsp;<a onclick="(new Image()).src='/rg/find-media-title/media_strip/images/b.gif?link=/title/tt0087538/';"<--!I NEED THIS!!!! --> href="/title/tt0087538/">The Karate Kid</a> (1984)</b></p>
<style type="text/css">    
</style>

<table style="border-collapse: collapse;">
</table>
</div>



I need to somehow extract the href value of the (new Image()). How exactly would I accomplish this with HtmlAgilityPack?

I'm new to it, and so far I haven't found a useful tutorial on how to effectively use it for parsing.

Thanks for the help!

Was This Post Helpful? 0

#3 mavarazo   User is offline

  • D.I.C Head
  • member icon

Reputation: 37
  • View blog
  • Posts: 182
  • Joined: 25-October 10

Re: Help using HtmlAgilityPack and selecting text inside of <p>

Posted 12 November 2010 - 02:04 AM

It would be very easy with Regex.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1