Discussion Thread
Data Extractor
Message Thread
Extract any data, including email addresses and URLs from your files and webpages.
Posted in the Data Extractor Forum.
Extract data between specific div id text
Hi,
I would like to extract a data between a specific text. For example:
###
div id="short"
asdasdasdasdasd
asdasdasdasdasdasdasd
/div
###
I would like to extract the data between ###
###
I know how to put ### in all files but how to extract the text could help a lot.
Extract data between specific div id text
The easiest way would be to write a javascript rule. Does your div have an id or class attribute?
Extract data between specific div id text
Oh wait.. it does.. use this:
DataExtractor.SetColumns(1);
DataExtractor.AddHeader(1, 'Text');
var div = document.getElementById('short');
DataExtractor.StartNewResult();
DataExtractor.AddResult(1, div.innerHTML);
Extract data between specific div id text
How would one do this using a class attribute instead? Thanks.
Extract data between specific div id text
You would have to use getElementByTagName and loop over them with a for loop and check the className property.