did anybody try to isolate a certain portion of html text imported into a field using plugin.http.getPageData()?
Is it a good idea to use a “filemaker” method (using Middle and Position funtions to locate the beginning and set the lenght of the text you want to parse) or is there a better way to do that task?
did anybody try to isolate a certain portion of html text imported into a field using plugin.http.getPageData()?
Is it a good idea to use a “filemaker” method (using Middle and Position funtions to locate the beginning and set the lenght of the text you want to parse) or is there a better way to do that task?
Check Servoy Magazine later this week – I’m currently finishing up an article with sample files that includes parsing html files. The two functions I use are:
var pos_next = html_string.search(regex expression);
html_string = utils.stringMiddle(html_string, pos_next, html_string_length);
If you are parsing an html table, the pseudo code to add each row as a new record and each column as a field is:
loop through each row
new record
__remove leading
__loop through each cell
____remove leading
____field = cell
____remove trailing
__end loop
__remove trailing
end loop
david:
Check Servoy Magazine later this week – I’m currently finishing up an article with sample files that includes parsing html files. The two functions I use are:
var pos_next = html_string.search(regex expression);
html_string = utils.stringMiddle(html_string, pos_next, html_string_length);
If you are parsing an html table, the pseudo code to add each row as a new record and each column as a field is:
loop through each row
new record
__remove leading
__loop through each cell
____remove leading
____field = cell
____remove trailing
__end loop
__remove trailing
end loop
david
Wow! Great: It’s a very powerful feature and I’m very curious about it. ))
“Later this week” turned into “later next month.” Sorry for the delay. There is an article now posted at Servoy Magazine entitled: “Servoy to FileMaker and Back” which has a healthy html string parsing routine in it.
david:
“Later this week” turned into “later next month.” Sorry for the delay. There is an article now posted at Servoy Magazine entitled: “Servoy to FileMaker and Back” which has a healthy html string parsing routine in it.