Extract text from HTML tag

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

asoydah
Posts: 4
Joined: Tue Aug 26, 2008 10:03 am

Extract text from HTML tag

Postby asoydah » Wed Aug 27, 2008 12:23 pm

How can i extract the text from HTML tag?
Example :
<h3><b><a name="F5">Family SUV / Wagon</a></b></h3>
<h4>Mitsubishi Outlander or similar</h4>
<ul>
<li>4 door SUV</li>
<li><b>Auto</b>, Power Steering, MP3/CD player</li>
<li>Air Conditioning</li>
<li>

I want to extract to be an XML file like
<name>Mitsubishi Outlander or similar</name>
<desc>Family Suv</desc>

can someone help me with the filter?

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extract text from HTML tag

Postby DataMystic Support » Wed Aug 27, 2008 2:17 pm

Use an EasyPattern search/replace with Extract option turned on.

Replace variable sections with:
[ capture(1+ chars) as 'car' ]
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

asoydah
Posts: 4
Joined: Tue Aug 26, 2008 10:03 am

Re: Extract text from HTML tag

Postby asoydah » Wed Aug 27, 2008 4:53 pm

Sorry for being the idiot here.. :(
but which one should I replace?

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extract text from HTML tag

Postby DataMystic Support » Wed Aug 27, 2008 5:40 pm

Are you buying TextPipe Pro..? Have you looked at the web site mining docs at http://www.datamystic.com/docs ?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

User avatar
Fixer
Posts: 22
Joined: Thu Jul 31, 2008 6:39 am
Location: European Union > Poland
Contact:

Re: Extract text from HTML tag

Postby Fixer » Thu Aug 28, 2008 9:32 pm

Hi asoydah
I made for You filter in TextPipe.
Download it here: http://plikojad.pl/bbg79d7lxszl (cars.rar > unzip to cars.fll and open it)
:)

Result:

Code: Select all

<cars>
  <name>Mitsubishi Outlander or similar</name>
  <desc>Family SUV / Wagon</desc>
    <option>4 door SUV</option>
    <option><b>Auto</b>, Power Steering, MP3/CD player</option>
    <option>Air Conditioning</option>
</cars>

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extract text from HTML tag

Postby DataMystic Support » Thu Aug 28, 2008 10:20 pm

Thanks Fixer!
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

asoydah
Posts: 4
Joined: Tue Aug 26, 2008 10:03 am

Re: Extract text from HTML tag

Postby asoydah » Thu Aug 28, 2008 11:01 pm

Thx Fixer.. I already click that but can't download anything?
Maybe that's a broken link?

User avatar
Fixer
Posts: 22
Joined: Thu Jul 31, 2008 6:39 am
Location: European Union > Poland
Contact:

Re: Extract text from HTML tag

Postby Fixer » Fri Aug 29, 2008 10:19 pm

No it works! Oh gosh...
You must click twice! (first on the link and next on the file cars.rar)
But ok don't worry try now click this directly link: http://plikojad.pl/download/bbk4h4wsehn ... 642cd74058

Image


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 4 guests