# HTMLParser **Repository Path**: liulinboyi8023/HTMLParser ## Basic Information - **Project Name**: HTMLParser - **Description**: HTMLParser 解析HTML - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-12 - **Last Updated**: 2021-09-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: htmlparser, parser ## README # HTML Parser ## 解析HTML ## HTML ```html
{
"type": "root",
"children": [
{
"type": "DTD",
"LineNum": 1,
"content": "DOCTYPE html"
},
{
"content": "\r\n",
"LineNum": 1,
"type": "text"
},
{
"children": [
{
"content": "\r\n",
"LineNum": 2,
"type": "text"
},
{
"children": [
{
"content": "\r\n ",
"LineNum": 3,
"type": "text"
},
{
"children": [],
"attr": [
{
"name": "charset",
"value": "UTF-8"
}
],
"LineNum": 4,
"type": "tag",
"tag": "meta"
},
{
"content": "\r\n ",
"LineNum": 4,
"type": "text"
},
{
"children": [],
"attr": [
{
"name": "http-equiv",
"value": "X-UA-Compatible"
},
{
"name": "content",
"value": "IE=edge"
}
],
"LineNum": 5,
"type": "tag",
"tag": "meta"
},
{
"content": "\r\n ",
"LineNum": 5,
"type": "text"
},
{
"children": [],
"attr": [
{
"name": "name",
"value": "viewport"
},
{
"name": "content",
"value": "width=device-width, initial-scale=1.0"
}
],
"LineNum": 6,
"type": "tag",
"tag": "meta"
},
{
"content": "\r\n ",
"LineNum": 6,
"type": "text"
},
{
"children": [
{
"content": "Document",
"LineNum": 7,
"type": "text"
}
],
"attr": [],
"LineNum": 7,
"type": "tag",
"tag": "title"
},
{
"content": "\r\n",
"LineNum": 7,
"type": "text"
}
],
"attr": [],
"LineNum": 3,
"type": "tag",
"tag": "head"
},
{
"content": "\r\n",
"LineNum": 8,
"type": "text"
},
{
"children": [
{
"content": "\r\n ",
"LineNum": 9,
"type": "text"
},
{
"children": [
{
"content": "\r\n ",
"LineNum": 10,
"type": "text"
},
{
"children": [
{
"content": "11{{res.value}}",
"LineNum": 11,
"type": "text"
}
],
"attr": [
{
"name": "v-if",
"value": "res.value"
},
{
"name": "name",
"value": "11"
},
{
"name": "@click",
"value": "tes"
}
],
"LineNum": 11,
"type": "tag",
"tag": "h1"
},
{
"content": "\r\n ",
"LineNum": 11,
"type": "text"
}
],
"attr": [],
"LineNum": 10,
"type": "tag",
"tag": "div"
},
{
"content": "\r\n ",
"LineNum": 12,
"type": "text"
},
{
"children": [],
"attr": [
{
"name": "href",
"value": "http://github.com/"
}
],
"LineNum": 13,
"type": "tag",
"tag": "a"
},
{
"content": "\r\n",
"LineNum": 13,
"type": "text"
}
],
"attr": [],
"LineNum": 9,
"type": "tag",
"tag": "body"
},
{
"content": "\r\n",
"LineNum": 14,
"type": "text"
}
],
"attr": [
{
"name": "lang",
"value": "en"
}
],
"LineNum": 2,
"type": "tag",
"tag": "html"
}
],
"LineNum": 1
}