Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing out certain html tags from CFHTTP

Status
Not open for further replies.

196509

IS-IT--Management
Sep 4, 2001
7
0
0
US
Hi all,
I am trying to parse out numerous <div> tags on pages that are output by <cfhttp> in a loop. Code I have so far(just CFHTTP part) is;

<cfloop query=&quot;listPages&quot;>
<cfhttp method=&quot;Get&quot; url=&quot; resolveurl=&quot;yes&quot;>
<cfoutput>#CFHTTP.FileContent#</cfoutput>
<br class=&quot;pagebreak&quot;>
</cfloop>

The pages retrived by cfhttp have different # of <div> tags depends on the pages. I like to have some code that see all the <div> tags on each page and remove them all. Could anyone help me with coding? Thanks a lot.
 
Are you trying to get rid of all <div> and </div> tags? Or do you want to get rid of the tags and all the information in between them as well? What is your end goal here? - tleish
 
My goal here for now is to get rid of all <div...> and </div> tags. These div tags use different CSS tags. For ex: there is <div id=&quot;A&quot; class=&quot;breadcrumb&quot;></div>, <div id=&quot;firsttextbox&quot;></div>, <div id=&quot;othertextbox&quot;></div> so on.
Any idea? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top