DOM for HTML and XML


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 as Ractive’s dynamic templating.

https://ractive.js.org/tutorials/iterative-sections/


Lascia un commento

Il tuo indirizzo email non sarà pubblicato.

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.