In: Computer Science
Hello, I have a problem with understanding this code.
value.parseHtml().select("p")[0].innerHtml()
This code is for the open refine program. Could you tell me what this code is trying to do? I have no idea what this is for...
For your information, this code appeared when professor was talking about 'Fetching and Parsing HTML'..
Thank you for answering my question and have a good day!
p.s. I don't know whether value.parseHtml().select("p")[0].innerHtml() is a code.
Anyways, my professor told us to insert that expression in the expression box and try to figure out what this expression means... As I'm not majoring in CS, it's too difficult for me to understand..;(
Please find the below step by step explanation of what the line do.
EXAMPLE:
Let's say we have the code in HTML
as:
<!DOCTYPE html>
<html>
<body>
<p>This is a para1.</p>
<p>This is a para2.</p>
<p>This is a para3.</p>
<p>This is a para4.</p>
</body>
</html>
The line value.parseHtml().select("p")[0].innerHtml() will select "This is a para1."