I'm trying to figure out a way to dynamically validate an XML Dom object. For example I want to be able to load an XML file in to a Document object then manipulate the structure of that object in memory. Each time I make changes to the object by adding or removing elements I would like the object to be re-validated against the DTD to make sure it's still valid. When the structure becomes invalid I want error messages generated.
I know I can validate the DOM object when the Document object gets generated but I want to be able to keep the object valid as it's manipulated.
Any help here would be appreciated, some example code would be helpful.
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)
In a previous article (http://www.experts-exchang…