How the DOM work in PHP is you load the html or xml string or file into a $dom-object (instantiated by the class)
You make any transformations or changes to that html through the DOM methods
Then you save that back out as a string or a file
So here we're loading your entire template-html file into the main php page's dom-object, and after all is said and done, printing that out to the browser window or saving it as an (probably in your case) temp-html file ... haven't really gone into those options much yet though.
Let me know if this does not make sense and I will try to paraphrase it some ... ?
Ahh... Ok, let me see if I have this correct and I am understanding the flow here. If I am understanding you correctly, this dom object sits between the html template and the browser. All modifications are done to the dom and the ONLY thing I need to do in the html template is add my ids like so:
Then any additional id that are needed need to be coded in the dom itself.
Is this a correct undersanding?
Sorry for the long posts guys.