gnumatt

"Mr. McKittrick, after very careful

“Mr. McKittrick, after very careful consideration, sir, I’ve come to the conclusion that your new defense system sucks."-General Beringer

I feel this way about XML namespaces at the moment. Oh they are cool, way cool, when you are hand coding your XML and you want to make things look all nice and tidy. However, when you switch to letting a machine generate the stuff all hell breaks loose. If anyone tells you otherwise then ask them how they copy a node with namespaces from one XML document to another without getting the oh so fabulous and uninformative “Namespace Error” message. I thought I was being cool when I learned how to get around the “Wrong Document” error. Oh no, not at all, all new errors were lurking behind it.

Oh and to be specific I’m talking about using DOM and the importNode() method. Yeah, I could write a manual copy routine from scratch but what a pain in the butt.