{"tests": [
{"description":"Tags test",
"input":">",
"output":[["StartTag", "z", {}], ["EndTag", "z"], ["ShortTag", ""], ["EmptyTag", "a", {}]]
},
{"description":"Test longer tags",
"input":"",
"output":[["StartTag", "az",{}],["EndTag", "xyz"]]
},
{"description":"Attributes DoubleQuoted",
"input":"",
"output":[["StartTag", "a", {"ax":"test"}]]},
{"description":"Attributes SingleQuoted",
"input":"",
"output":[["StartTag", "b", {"ay":"test"}]]},
{"description":"Attributes UnQuoted",
"input":"",
"output":[["StartTag", "c", {"az":"test"}]]},
{"description":"Start tag multiple attributes",
"input":"",
"output":[["StartTag", "c", {"a":"test1", "b":"test2", "c":"test3"}]]},
{"description":"Empty Tag multiple attributes",
"input":"",
"output":[["EmptyTag", "c", {"a":"test1", "b":"test2", "c":"test3"}]]
},
{"description":"Tag state Error >",
"input":"<>",
"output":["ParseError", ["Character", "<>"]]
},
{"description":"Tag state Error :",
"input":"<:",
"output":["ParseError", ["Character", "<:"]
]},
{"description":"Tag state Error <",
"input":"<<",
"output":["ParseError", ["Character", "<"], "ParseError", ["Character", "<"]]
},
{"description":"Tag state Error ' '",
"input":"< ",
"output":["ParseError", ["Character", "< "]]
},
{"description":"Tag state Error '\\t'",
"input":"<\t",
"output":["ParseError", ["Character", "<\t"]]
},
{"description":"Tag state Error '\\n'",
"input":"<\n",
"output":["ParseError", ["Character", "<\n"]]
},
{"description":"End tag state Error '\\t'",
"input":"\t",
"output":["ParseError", ["Character", "\t"]]
},
{"description":"End tag state Error '\\n'",
"input":"\n",
"output":["ParseError", ["Character", "\n"]]
},
{"description":"End tag state Error '\\n'",
"input":" ",
"output":["ParseError", ["Character", " "]]
},
{"description":"End tag state Error '<'",
"input":"<",
"output":["ParseError", ["Character", ""], "ParseError", ["Character", "<"]]
},
{"description":"End tag name after state",
"input":"",
"output":[["EndTag", "a"]]
},
{"description":"Start tag spaces in attribute",
"input":"",
"output":[["StartTag", "b", {"ay":"test"}]]
},
{"description":"Start tag with empty attribute",
"input":"",
"output":[["StartTag", "b", {"ay":""}]]
},
{"description":"Start tag with empty attributes",
"input":"",
"output":[["StartTag", "b", {"ay":"", "az":""}]]
},
{"description":"Empty tag with empty attribute",
"input":"",
"output":[["EmptyTag", "b", {"ay":""}]]
},
{"description":"End tag name after state with attr",
"input":"",
"output":["ParseError", "ParseError", "ParseError", "ParseError", "ParseError", ["EndTag", "a"]]
},
{"description":"PI tag",
"input":"",
"output":[["PI", "xslt", "ma"]]
},
{"description":"PI tag",
"input":"",
"output":[["PI", "xslt", "m"]]
},
{"description":"PI tag with '?' in target",
"input":"?xml \t\n m?>",
"output":[["PI", "?xml", "m"]]
},
{"description":"PI tag with '?' in PiAfter state",
"input":"",
"output":[["PI", "xml", "m"]]
},
{"description":"PI tag with char in PiAfter state",
"input":"",
"output":[["PI", "xml", "m"]]
},
{"description":"CDATA state",
"input":"",
"output":[["Character", "&ing"]]
},
{"description":"CDATA state",
"input":"",
"output":[["Character", "&ing ]"]]
},
{"description":"CDATA bracket text state",
"input":"",
"output":[["Character", "bracket ]after"]]
},
{"description":"CDATA state",
"input":"",
"output":[["Character", "&ing]] "]]
}
]}