J
JackieWilson
Hello!
I', trying to create DOM based XML document. First I create XmlDocument
object and then read other XML DOM Document and modifie the first one.
I'm putting Noden and Attributes tto the first XML DOM document when needed.
Everything seems to be allrigth but when I trying to save the scratch based
DOM Document wirj following code I get an error: "Cannot use a prefix with
an empty namespace".
FileStream fs = new FileStream(dumpFile, FileMode.OpenOrCreate,
FileAccess.Write);
XmlTextWriter w = new XmlTextWriter(fs, Encoding.UTF8);
w.Formatting = Formatting.Indented;
document.Save(w);
w.Flush();
w.Close();
What is wrong adn what this "Cannot use a prefix with an empty namespace"
errormessage measn? Is it not allowed to create in C# a XML DOM document
without usig Load method first.
Cheers!
I', trying to create DOM based XML document. First I create XmlDocument
object and then read other XML DOM Document and modifie the first one.
I'm putting Noden and Attributes tto the first XML DOM document when needed.
Everything seems to be allrigth but when I trying to save the scratch based
DOM Document wirj following code I get an error: "Cannot use a prefix with
an empty namespace".
FileStream fs = new FileStream(dumpFile, FileMode.OpenOrCreate,
FileAccess.Write);
XmlTextWriter w = new XmlTextWriter(fs, Encoding.UTF8);
w.Formatting = Formatting.Indented;
document.Save(w);
w.Flush();
w.Close();
What is wrong adn what this "Cannot use a prefix with an empty namespace"
errormessage measn? Is it not allowed to create in C# a XML DOM document
without usig Load method first.
Cheers!