Last active
August 29, 2015 13:58
-
-
Save boughtonp/9930604 to your computer and use it in GitHub Desktop.
Using JSoup on CF10 with input from CFHTTP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component | |
{ | |
This.Name = "jsoup_with_cfhttp"; | |
This.JavaSettings = { LoadPaths:["./jsoup-1.7.2.jar"] }; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jsoup jar file in same directory] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfhttp url="http://stackoverflow.com/questions/tagged/cfml%20or%20railo%20or%20coldfusion*" method="get"> | |
<cfhttpparam type="url" name="sort" value="active" /> | |
</cfhttp> | |
<cfscript> | |
jsoup = createObject("java","org.jsoup.Jsoup"); | |
dom = jsoup.parse(cfhttp.FileContent); | |
content = dom.getElementById("content"); | |
</cfscript> | |
<cfdump var=#content.html()# /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment