|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
grabbing content which is loacted between tags
what I would like to do is separate page of content from the rest of an html file.
so basically currently I have the html page content going to a variable the html content would look like this: Code:
<html> <head> <title>Document title</title> </head> <body> text header <pre> main text </pre> text footer </body> </html> so what I want to do set the content between '<pre> and </pre>' the content doesn't have to be saved its just the main text value that need. any suggestions Thank you |
|
#2
|
|||
|
|||
|
Why don't you just capture the main page content using <cfsaveconent> and then drop that variable into the html layout?
<cfsavecontent variable="pageContent"> <cfinclude template="whatever template(s) generate the content for this page" /> </cfsavecontent> And then in your HTML layout file... <html> <head> <title>Document title</title> </head> <body> text header <cfoutput> #pageContent# </cfoutput> text footer </body> </html> The Fusebox framework has extensive capabilities in this area and makes generating separate pieces of content simple, and then aggregating them into a final layout simple as well. Check out www.fusebox.org. I also have a sample bookstore application that shows off the layout functions at www.briankotek.com.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
I'll look throught the fusebox tool in more detail, it might be usfull for other projects, But the main problem is that the file that I am trying to grab the info from, are and can only be an html file, located on a different server, and so I am useing the cfhttp fuction to get the info. the reason for doinging this, is because the content that I need is updated everynight and the people in charge of the other site dont want to have too ftp the info twice.
Any other suggestions |
|
#4
|
|||
|
|||
|
You need to parse the file and strip out what you want. Look at the string functions, specifically mid(), reFind(), reFindNoCase(), find(), and findNoCase().
|
|
#5
|
|||
|
|||
|
I see what I can do with that thank you
|
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > grabbing content which is loacted between tags |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|