swc/crates/swc_xml_parser/tests/fixture/basic-1/output.json

964 lines
25 KiB
JSON
Raw Normal View History

2022-08-01 06:56:12 +03:00
{
"type": "Document",
"span": {
"start": 1,
"end": 1115,
"ctxt": 0
},
"children": [
{
"type": "ProcessingInstruction",
"span": {
"start": 1,
"end": 22,
"ctxt": 0
},
"target": "xml",
"data": "version=\"1.0\""
},
{
"type": "Element",
"span": {
"start": 23,
"end": 1115,
"ctxt": 0
},
"tagName": "PurchaseOrder",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "PurchaseOrderNumber",
"rawName": "PurchaseOrderNumber",
"value": "99503",
"rawValue": "\"99503\""
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "OrderDate",
"rawName": "OrderDate",
"value": "1999-10-20",
"rawValue": "\"1999-10-20\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 89,
"end": 94,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 94,
"end": 324,
"ctxt": 0
},
"tagName": "Address",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "Type",
"rawName": "Type",
"value": "Shipping",
"rawValue": "\"Shipping\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 119,
"end": 128,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 128,
"end": 152,
"ctxt": 0
},
"tagName": "Name",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 134,
"end": 145,
"ctxt": 0
},
"data": "Ellen Adams",
"raw": "Ellen Adams"
}
]
},
{
"type": "Text",
"span": {
"start": 152,
"end": 161,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 161,
"end": 194,
"ctxt": 0
},
"tagName": "Street",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 169,
"end": 185,
"ctxt": 0
},
"data": "123 Maple Street",
"raw": "123 Maple Street"
}
]
},
{
"type": "Text",
"span": {
"start": 194,
"end": 203,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 203,
"end": 227,
"ctxt": 0
},
"tagName": "City",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 209,
"end": 220,
"ctxt": 0
},
"data": "Mill Valley",
"raw": "Mill Valley"
}
]
},
{
"type": "Text",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 236,
"end": 253,
"ctxt": 0
},
"tagName": "State",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 243,
"end": 245,
"ctxt": 0
},
"data": "CA",
"raw": "CA"
}
]
},
{
"type": "Text",
"span": {
"start": 253,
"end": 262,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 262,
"end": 278,
"ctxt": 0
},
"tagName": "Zip",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 267,
"end": 272,
"ctxt": 0
},
"data": "10999",
"raw": "10999"
}
]
},
{
"type": "Text",
"span": {
"start": 278,
"end": 287,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 287,
"end": 309,
"ctxt": 0
},
"tagName": "Country",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 296,
"end": 299,
"ctxt": 0
},
"data": "USA",
"raw": "USA"
}
]
},
{
"type": "Text",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 324,
"end": 329,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 329,
"end": 547,
"ctxt": 0
},
"tagName": "Address",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "Type",
"rawName": "Type",
"value": "Billing",
"rawValue": "\"Billing\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 353,
"end": 362,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 362,
"end": 382,
"ctxt": 0
},
"tagName": "Name",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 368,
"end": 375,
"ctxt": 0
},
"data": "Tai Yee",
"raw": "Tai Yee"
}
]
},
{
"type": "Text",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 391,
"end": 420,
"ctxt": 0
},
"tagName": "Street",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 399,
"end": 411,
"ctxt": 0
},
"data": "8 Oak Avenue",
"raw": "8 Oak Avenue"
}
]
},
{
"type": "Text",
"span": {
"start": 420,
"end": 429,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 429,
"end": 450,
"ctxt": 0
},
"tagName": "City",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 435,
"end": 443,
"ctxt": 0
},
"data": "Old Town",
"raw": "Old Town"
}
]
},
{
"type": "Text",
"span": {
"start": 450,
"end": 459,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 459,
"end": 476,
"ctxt": 0
},
"tagName": "State",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 466,
"end": 468,
"ctxt": 0
},
"data": "PA",
"raw": "PA"
}
]
},
{
"type": "Text",
"span": {
"start": 476,
"end": 485,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 485,
"end": 501,
"ctxt": 0
},
"tagName": "Zip",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 490,
"end": 495,
"ctxt": 0
},
"data": "95819",
"raw": "95819"
}
]
},
{
"type": "Text",
"span": {
"start": 501,
"end": 510,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 510,
"end": 532,
"ctxt": 0
},
"tagName": "Country",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 519,
"end": 522,
"ctxt": 0
},
"data": "USA",
"raw": "USA"
}
]
},
{
"type": "Text",
"span": {
"start": 532,
"end": 537,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 547,
"end": 552,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 552,
"end": 625,
"ctxt": 0
},
"tagName": "DeliveryNotes",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 567,
"end": 609,
"ctxt": 0
},
"data": "Please leave packages in shed by driveway.",
"raw": "Please leave packages in shed by driveway."
}
]
},
{
"type": "Text",
"span": {
"start": 625,
"end": 630,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 630,
"end": 1098,
"ctxt": 0
},
"tagName": "Items",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 637,
"end": 646,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 646,
"end": 866,
"ctxt": 0
},
"tagName": "Item",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "PartNumber",
"rawName": "PartNumber",
"value": "872-AA",
"rawValue": "\"872-AA\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 672,
"end": 685,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 685,
"end": 721,
"ctxt": 0
},
"tagName": "ProductName",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 698,
"end": 707,
"ctxt": 0
},
"data": "Lawnmower",
"raw": "Lawnmower"
}
]
},
{
"type": "Text",
"span": {
"start": 721,
"end": 734,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 734,
"end": 756,
"ctxt": 0
},
"tagName": "Quantity",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 744,
"end": 745,
"ctxt": 0
},
"data": "1",
"raw": "1"
}
]
},
{
"type": "Text",
"span": {
"start": 756,
"end": 769,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 769,
"end": 794,
"ctxt": 0
},
"tagName": "USPrice",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 778,
"end": 784,
"ctxt": 0
},
"data": "148.95",
"raw": "148.95"
}
]
},
{
"type": "Text",
"span": {
"start": 794,
"end": 807,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 807,
"end": 850,
"ctxt": 0
},
"tagName": "Comment",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 816,
"end": 840,
"ctxt": 0
},
"data": "Confirm this is electric",
"raw": "Confirm this is electric"
}
]
},
{
"type": "Text",
"span": {
"start": 850,
"end": 859,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 866,
"end": 875,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 875,
"end": 1085,
"ctxt": 0
},
"tagName": "Item",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "PartNumber",
"rawName": "PartNumber",
"value": "926-AA",
"rawValue": "\"926-AA\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 901,
"end": 914,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 914,
"end": 953,
"ctxt": 0
},
"tagName": "ProductName",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 927,
"end": 939,
"ctxt": 0
},
"data": "Baby Monitor",
"raw": "Baby Monitor"
}
]
},
{
"type": "Text",
"span": {
"start": 953,
"end": 966,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 966,
"end": 988,
"ctxt": 0
},
"tagName": "Quantity",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 976,
"end": 977,
"ctxt": 0
},
"data": "2",
"raw": "2"
}
]
},
{
"type": "Text",
"span": {
"start": 988,
"end": 1001,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 1001,
"end": 1025,
"ctxt": 0
},
"tagName": "USPrice",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1010,
"end": 1015,
"ctxt": 0
},
"data": "39.98",
"raw": "39.98"
}
]
},
{
"type": "Text",
"span": {
"start": 1025,
"end": 1038,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 1038,
"end": 1069,
"ctxt": 0
},
"tagName": "ShipDate",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1048,
"end": 1058,
"ctxt": 0
},
"data": "1999-05-21",
"raw": "1999-05-21"
}
]
},
{
"type": "Text",
"span": {
"start": 1069,
"end": 1078,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 1085,
"end": 1090,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
}
]
},
{
"type": "Text",
"span": {
"start": 1098,
"end": 1099,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
]
}
]
}