{"id":527,"date":"2022-05-12T15:36:25","date_gmt":"2022-05-12T13:36:25","guid":{"rendered":"https:\/\/workerbase.org\/wordpress\/?p=527"},"modified":"2025-03-17T14:01:35","modified_gmt":"2025-03-17T13:01:35","slug":"dom-for-html-and-xml","status":"publish","type":"post","link":"https:\/\/arkenidar.com\/wordpress\/2022\/05\/12\/dom-for-html-and-xml\/","title":{"rendered":"DOM for HTML and XML"},"content":{"rendered":"\n<p>Document Object Model means a programmatic way of dealing with the structure of a Document (both XML Document or HTML document).<\/p>\n\n\n\n<p>This is DOM: <a href=\"https:\/\/www.w3schools.com\/xml\/dom_intro.asp\">https:\/\/www.w3schools.com\/xml\/dom_intro.asp<\/a><\/p>\n\n\n\n<p>But HTML adds to it: <a href=\"https:\/\/www.w3schools.com\/jsref\/dom_obj_document.asp\">https:\/\/www.w3schools.com\/jsref\/dom_obj_document.asp<\/a><\/p>\n\n\n\n<p>E.g. this is HTML not XML: <a href=\"https:\/\/www.w3schools.com\/jsref\/met_node_insertadjacenthtml.asp\">https:\/\/www.w3schools.com\/jsref\/met_node_insertadjacenthtml.asp<\/a><\/p>\n\n\n\n<p>BTW one well\/widely understood way of dealing with this is: <a href=\"https:\/\/api.jquery.com\/category\/manipulation\/\">https:\/\/api.jquery.com\/category\/manipulation\/<\/a><\/p>\n\n\n\n<p>ADDENDUM: there are other ways such as Ractive&#8217;s dynamic templating.<\/p>\n\n\n\n<p><a href=\"https:\/\/ractive.js.org\/tutorials\/iterative-sections\/\">https:\/\/ractive.js.org\/tutorials\/iterative-sections\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Document Object Model means a programmatic way of dealing with the structure of a Document (both XML Document or HTML document). This is DOM: https:\/\/www.w3schools.com\/xml\/dom_intro.asp But HTML adds to it: https:\/\/www.w3schools.com\/jsref\/dom_obj_document.asp E.g. this is HTML not XML: https:\/\/www.w3schools.com\/jsref\/met_node_insertadjacenthtml.asp BTW one well\/widely understood way of dealing with this is: https:\/\/api.jquery.com\/category\/manipulation\/ ADDENDUM: there are other ways such [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-527","post","type-post","status-publish","format-standard","hentry","category-senza-categoria"],"_links":{"self":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":1,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"predecessor-version":[{"id":528,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/527\/revisions\/528"}],"wp:attachment":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}