I would like to convert HTML site to Javascript Object, For example if user given the url in text box "http://Host/page" then need to scrape the website and convert it to javascript object like below ,
{
"rootId": 1,
"children": [
{
"nodeType": 10,
"id": 2,
"name": "html",
"publicId": "",
"systemId": ""
},
{
"nodeType": 1,
"id": 3,
"tagName": "HTML",
"attributes": {
"lang": "en"
},
"childNodes": [
{
"nodeType": 1,
"id": 4,
"tagName": "HEAD",
"attributes": {},
"childNodes": [
{
"nodeType": 3,
"id": 5,
"textContent": "\n"
},
{
"nodeType": 1,
"id": 6,
"tagName": "TITLE",
"attributes": {},
"childNodes": [
{
"nodeType": 3,
"id": 7,
"textContent": "About"
}
]
},......
Any Help Appreciated