swc/crates/swc_xml_parser/tests/fixture/basic/output.json
2022-08-01 03:56:12 +00:00

693 lines
20 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 784,
"ctxt": 0
},
"children": [
{
"type": "ProcessingInstruction",
"span": {
"start": 1,
"end": 39,
"ctxt": 0
},
"target": "xml",
"data": "version=\"1.0\" encoding=\"UTF-8\""
},
{
"type": "Element",
"span": {
"start": 40,
"end": 783,
"ctxt": 0
},
"tagName": "svg",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "xmlns",
"rawName": "xmlns",
"value": "http://www.w3.org/2000/svg",
"rawValue": "\"http://www.w3.org/2000/svg\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "viewBox",
"rawName": "viewBox",
"value": "0 0 83 121",
"rawValue": "\"0 0 83 121\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 101,
"end": 106,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Comment",
"span": {
"start": 106,
"end": 119,
"ctxt": 0
},
"data": " test ",
"raw": "<!-- test -->"
},
{
"type": "Text",
"span": {
"start": 119,
"end": 124,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 124,
"end": 776,
"ctxt": 0
},
"tagName": "g",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "fill",
"rawName": "fill",
"value": "none",
"rawValue": "\"none\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke-linecap",
"rawName": "stroke-linecap",
"value": "round",
"rawValue": "\"round\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 162,
"end": 171,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 171,
"end": 371,
"ctxt": 0
},
"tagName": "g",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke-width",
"rawName": "stroke-width",
"value": "8",
"rawValue": "\"8\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 191,
"end": 204,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 204,
"end": 247,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M23,40l2,13l-13-2",
"rawValue": "\"M23,40l2,13l-13-2\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#FD4",
"rawValue": "\"#FD4\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 247,
"end": 260,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 260,
"end": 303,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M36,40l-1,13l13-3",
"rawValue": "\"M36,40l-1,13l13-3\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#D25",
"rawValue": "\"#D25\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 303,
"end": 316,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 316,
"end": 358,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M23,80l7-11l7,11",
"rawValue": "\"M23,80l7-11l7,11\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#8CE",
"rawValue": "\"#8CE\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 358,
"end": 367,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 371,
"end": 380,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 380,
"end": 663,
"ctxt": 0
},
"tagName": "g",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke-width",
"rawName": "stroke-width",
"value": "6",
"rawValue": "\"6\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 400,
"end": 413,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 413,
"end": 459,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M8,4c-8,9-5,30,17,49",
"rawValue": "\"M8,4c-8,9-5,30,17,49\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#FD4",
"rawValue": "\"#FD4\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 459,
"end": 472,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 472,
"end": 522,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M79,25c-22-6-32,14-42,26",
"rawValue": "\"M79,25c-22-6-32,14-42,26\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#D25",
"rawValue": "\"#D25\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 522,
"end": 535,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 535,
"end": 585,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M10,118c23-8,20-30,20-44",
"rawValue": "\"M10,118c23-8,20-30,20-44\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#8CE",
"rawValue": "\"#8CE\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 585,
"end": 598,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 598,
"end": 650,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M20,48l10,12v13m0-13l10-12",
"rawValue": "\"M20,48l10,12v13m0-13l10-12\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#FFF",
"rawValue": "\"#FFF\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 650,
"end": 659,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 663,
"end": 672,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 672,
"end": 741,
"ctxt": 0
},
"tagName": "path",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"rawName": "d",
"value": "M20,48l10,12v13m0-13l10-12",
"rawValue": "\"M20,48l10,12v13m0-13l10-12\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke-width",
"rawName": "stroke-width",
"value": "5",
"rawValue": "\"5\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "stroke",
"rawName": "stroke",
"value": "#000",
"rawValue": "\"#000\""
}
],
"children": []
},
{
"type": "Text",
"span": {
"start": 741,
"end": 750,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 750,
"end": 767,
"ctxt": 0
},
"tagName": "text",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 756,
"end": 760,
"ctxt": 0
},
"data": "Text",
"raw": "Text"
}
]
},
{
"type": "Text",
"span": {
"start": 767,
"end": 772,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 776,
"end": 777,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
]
}
]
}