{"id":1210,"date":"2020-01-11T18:55:37","date_gmt":"2020-01-11T18:55:37","guid":{"rendered":"http:\/\/www.codedread.com\/blog\/?p=1210"},"modified":"2020-02-03T21:08:44","modified_gmt":"2020-02-03T21:08:44","slug":"xml-needed-an-array-type","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2020\/01\/11\/xml-needed-an-array-type\/","title":{"rendered":"XML Needed an Array Type"},"content":{"rendered":"\n<a href=\"https:\/\/www.json.org\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/codedread.com\/clipart\/json.svg\" style=\"float:right\" alt=\"Logo for JSON\" width=\"100\" height=\"100\"><\/a>\n\n\n\n<p>To be filed under \"shoulda-woulda-coulda\" and \"no-shit-sherlock\" and also \"forgot-to-write-about-this-fifteen-years-ago\"...<\/p>\n\n\n\n<p>I have had to think about XML for the first time in a few years (for the curious, you can read <a href=\"https:\/\/github.com\/w3c\/publ-epub-revision\/issues\/1309\">this EPUB bug<\/a> I filed).  If XML had had an array type for simple values (strings), then instead of representing a list of values like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#60;topLevel>\n  &#60;myList>\n    &#60;item value=\"abc\" \/>\n    &#60;item value=\"def\" \/>\n    &#60;item value=\"ghi\" \/>\n  &#60;\/myList>\n&#60;\/topLevel><\/code><\/pre>\n\n\n\n<p>It could have been this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#60;topLevel myList=[\"abc\", \"def\", \"ghi\"] \/><\/code><\/pre>\n\n\n\n<p>Would folks have abandoned XML for JSON so quickly?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To be filed under &#8220;shoulda-woulda-coulda&#8221; and &#8220;no-shit-sherlock&#8221; and also &#8220;forgot-to-write-about-this-fifteen-years-ago&#8221;&#8230; I have had to think about XML for the first time in a few years (for the curious, you can read this EPUB bug I filed). If XML had had an array type for simple values (strings), then instead of representing a list of values [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,11,28,30],"tags":[202,201],"class_list":["post-1210","post","type-post","status-publish","format-standard","hentry","category-software","category-technology","category-web","category-xml","tag-json","tag-xml"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/1210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=1210"}],"version-history":[{"count":7,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/1210\/revisions"}],"predecessor-version":[{"id":1219,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/1210\/revisions\/1219"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}