View Full Version : progratically add attributes to PI or Document
Is it valid to programatically add attributes to the processing instruction or the Document node? I want to hang some stuff into the DOM so that I can use it later during processing. I know I can try it and see if it works, but what I'm concerned about is if this is not a standard behavior, it may break later.
Alex Vincent
12-11-2004, 04:48 AM
Um, as far as I know, processing instructions and documents don't have attributes. Even the XML stylesheet PI has pseudo-attributes.
But they are subclasses of Node and Element which do have setters and getters for attributes. That's why I was wondering what would happen if I used them. I'll experiment.
Alex Vincent
12-15-2004, 07:26 AM
:) Of Node, yes. Of Element, no.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.