I am very new to JavaScript and I have been tasked by my job to make a HTML Parser that can go through lines of a html file and find say an ID tag and then match it with an excel sheet (or CSV), and then swap the ID with a value from the spreadsheet / CSV file.
NOTE: I am not asking you to do it for me; just I have looked through loads and I am just not aware of the right parser I need. A point in the right direction would be great thanks.
Here is an example of a HTML document with IDs: (The ID's are prefixed with #IDHERE# as I don't know how to prefix an ID without the parser yet)
<html>
<head>
//Header Data Here
</head>
<body>
<h1>#ID_MainTitle#</h1>
<p>#ID_Para1#</p>
</body>
</html>
Here is a table (Lua) (could be excel etc, but just for an example):
{
["ID_MainTitle"] = "Hello World",
["ID_Para1"] = "This is a test!",
}
This would need to be the end result:
<html>
<head>
//Header Data Here
</head>
<body>
<h1>Hello World</h1>
<p>This is a test!</p>
</body>
</html>
I know it's not much help but I did have a look but none of the ones I found looked remotely like what I need.