The following code is intended to insert a doctype declaration into a document that doesn't currently have one. Or replace it if it does. The replacement section works fine... but inserting a new one just before the root node seems to fail at the InsertBefore() function on line 30. The code for insertion (if the nextNode is null i.e. we found no doctype anywhere), starts at line 22
http://codepad.org/J6SDN5dw Unhandled exception at 0x7c812aeb in XMLBox.exe: Microsoft C++ exception: xercesc_2_8::DOMException at memory location 0x0012fab8.. Thanks
