Im trying to parse some html to get all the href values from it. Once I have
the href's I try to remove the html tags from them and add the resulting links
into an array. Problem is I get the following error message: The value ''
cannot be converted to a number The error occurred in
C:\CFusionMX\wwwroot\Project\crawler.cfm: line 27 25 : <cfset StartPos =
Match.pos[1] + Match.len[1]> 26 : <cfset Foundlinks =
Mid(cfhttp.FileContent, Match.pos[1], Match.len[1])> 27 : <cfset linksarray
= ArrayNew(FoundLinks2)> 28 : </cfloop> 29 : Here is my code if that
helps: <cffile action='read'
file='C:\CFusionMX\wwwroot\Project\template.xml' variable='theXML'> <cfset
myXML = xmlParse(theXML)> <cfset siteIndex =
myXML.xmlRoot.site.XMLAttributes.index> <cfset parseLinks =
myXML.xmlRoot.site.parse.XMLAttributes.re> <cfhttp method='get'
URL='#siteIndex#' ResolveURL='yes'></cfhttp> <cfset StartPos = 1> <cfloop
condition='True'> <cfset Match = REFindNoCase(parseLinks,
cfhttp.FileContent, StartPos, True)> <cfif Match.pos[1] EQ 0> <cfbreak>
<cfelse> <cfloop from='2' to='#ArrayLen(Match.pos)#' index='i'>
<cfset FoundLinks2 =
#REReplace(#Mid(parseLinks,Match.pos,Match.len)#,' <[^>]*>','','all')#>
<cfset StartPos = Match.pos[1] + Match.len[1]> <cfset Foundlinks =
Mid(cfhttp.FileContent, Match.pos[1], Match.len[1])> <cfset linksarray =
ArrayNew(FoundLinks2)> </cfloop> <cfoutput> <cfloop from='1'
to='#arrayLen(linksarray)#' index='i'> #linksarray# </cfloop> </cfoutput>
</cfif> </cfloop>