{
  "type": "Document",
  "span": {
    "start": 1,
    "end": 1021
  },
  "children": [
    {
      "type": "Element",
      "span": {
        "start": 1,
        "end": 1020
      },
      "tagName": "root",
      "attributes": [],
      "children": [
        {
          "type": "Text",
          "span": {
            "start": 7,
            "end": 12
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 12,
            "end": 66
          },
          "tagName": "description",
          "attributes": [],
          "children": [
            {
              "type": "Text",
              "span": {
                "start": 25,
                "end": 52
              },
              "data": "An example of escaped CENDs",
              "raw": "An example of escaped CENDs"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 66,
            "end": 71
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Comment",
          "span": {
            "start": 71,
            "end": 109
          },
          "data": " This text contains a CEND ]]> ",
          "raw": "<!-- This text contains a CEND ]]> -->"
        },
        {
          "type": "Text",
          "span": {
            "start": 109,
            "end": 114
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Comment",
          "span": {
            "start": 114,
            "end": 236
          },
          "data": " In this first case we put the ]] at the end of the first CDATA block\n         and the > in the second CDATA block ",
          "raw": "<!-- In this first case we put the ]] at the end of the first CDATA block\n         and the > in the second CDATA block -->"
        },
        {
          "type": "Text",
          "span": {
            "start": 236,
            "end": 241
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 241,
            "end": 426
          },
          "tagName": "exampleOfACDATA",
          "attributes": [],
          "children": [
            {
              "type": "Text",
              "span": {
                "start": 258,
                "end": 263
              },
              "data": "\n    ",
              "raw": "\n    "
            },
            {
              "type": "CdataSection",
              "span": {
                "start": 263,
                "end": 403
              },
              "data": "\n    Since this is a CDATA section\n    I can use all sorts of reserved characters\n    but my document is still well formed!\n    ",
              "raw": "<![CDATA[\n    Since this is a CDATA section\n    I can use all sorts of reserved characters\n    but my document is still well formed!\n    ]]>"
            },
            {
              "type": "Text",
              "span": {
                "start": 403,
                "end": 408
              },
              "data": "\n    ",
              "raw": "\n    "
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 426,
            "end": 431
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 431,
            "end": 484
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 434,
                "end": 480
              },
              "data": "<greeting>Hello, world!</greeting>",
              "raw": "<![CDATA[<greeting>Hello, world!</greeting>]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 484,
            "end": 489
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 489,
            "end": 515
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 492,
                "end": 511
              },
              "data": "content",
              "raw": "<![CDATA[content]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 515,
            "end": 520
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 520,
            "end": 546
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 523,
                "end": 542
              },
              "data": "&amping",
              "raw": "<![CDATA[&amping]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 546,
            "end": 551
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 551,
            "end": 579
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 554,
                "end": 575
              },
              "data": "&amping ]",
              "raw": "<![CDATA[&amping ]]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 579,
            "end": 584
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 584,
            "end": 613
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 587,
                "end": 609
              },
              "data": "&amping]] ",
              "raw": "<![CDATA[&amping]] ]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 613,
            "end": 618
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 618,
            "end": 660
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 621,
                "end": 656
              },
              "data": "<message>text</message>",
              "raw": "<![CDATA[<message>text</message>]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 660,
            "end": 665
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 665,
            "end": 735
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 668,
                "end": 731
              },
              "data": "</this is malformed!</malformed</malformed & worse>",
              "raw": "<![CDATA[</this is malformed!</malformed</malformed & worse>]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 735,
            "end": 740
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 740,
            "end": 773
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 743,
                "end": 756
              },
              "data": "1",
              "raw": "<![CDATA[1]]>"
            },
            {
              "type": "CdataSection",
              "span": {
                "start": 756,
                "end": 769
              },
              "data": "2",
              "raw": "<![CDATA[2]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 773,
            "end": 778
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 778,
            "end": 812
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "Text",
              "span": {
                "start": 781,
                "end": 790
              },
              "data": "\n        ",
              "raw": "\n        "
            },
            {
              "type": "CdataSection",
              "span": {
                "start": 790,
                "end": 806
              },
              "data": "data",
              "raw": "<![CDATA[data]]>"
            },
            {
              "type": "Text",
              "span": {
                "start": 806,
                "end": 808
              },
              "data": "  ",
              "raw": "  "
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 812,
            "end": 817
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 817,
            "end": 850
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 820,
                "end": 846
              },
              "data": "bracket ]after",
              "raw": "<![CDATA[bracket ]after]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 850,
            "end": 855
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 855,
            "end": 874
          },
          "tagName": "p",
          "attributes": [],
          "children": [
            {
              "type": "CdataSection",
              "span": {
                "start": 858,
                "end": 870
              },
              "data": "",
              "raw": "<![CDATA[]]>"
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 874,
            "end": 879
          },
          "data": "\n    ",
          "raw": "\n    "
        },
        {
          "type": "Element",
          "span": {
            "start": 879,
            "end": 1011
          },
          "tagName": "DocumentElement",
          "attributes": [],
          "children": [
            {
              "type": "Text",
              "span": {
                "start": 896,
                "end": 905
              },
              "data": "\n        ",
              "raw": "\n        "
            },
            {
              "type": "Element",
              "span": {
                "start": 905,
                "end": 988
              },
              "tagName": "foo",
              "attributes": [],
              "children": [
                {
                  "type": "Text",
                  "span": {
                    "start": 910,
                    "end": 926
                  },
                  "data": "\n            bar",
                  "raw": "\n            bar"
                },
                {
                  "type": "CdataSection",
                  "span": {
                    "start": 926,
                    "end": 970
                  },
                  "data": " Some <!-- My Comment --> Value ",
                  "raw": "<![CDATA[ Some <!-- My Comment --> Value ]]>"
                },
                {
                  "type": "Text",
                  "span": {
                    "start": 970,
                    "end": 982
                  },
                  "data": "foo\n        ",
                  "raw": "foo\n        "
                }
              ]
            },
            {
              "type": "Text",
              "span": {
                "start": 988,
                "end": 993
              },
              "data": "\n    ",
              "raw": "\n    "
            }
          ]
        },
        {
          "type": "Text",
          "span": {
            "start": 1011,
            "end": 1013
          },
          "data": "\"\n",
          "raw": "\"\n"
        }
      ]
    }
  ]
}
