Hey,
I am using C# to create an XML file in memory and then save it to a file. Everything is working
great apart from one thing which I can't figure out! :(
I have a few namespaces.. one is causing problems:
XmlDocument MANIFEST_XML_DOC = new XmlDocument();
XmlElement oManifest = MANIFEST_XML_DOC.CreateElement("manifest");
oManifest.SetAttribute("xmlns", "http://www.imsproject.org/xsd/imscp_rootv1p1p2");
oManifest.SetAttribute("xmlns:adlcp", "http://www.adlnet.org/xsd/adlcp_rootv1p2");
oManifest.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
oManifest.SetAttribute("xsi:schemaLocation",
"http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd
http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd
http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd");
MANIFEST_XML_DOC.AppendChild(oManifest);
MANIFEST_XML_DOC.Save("imsmanifest.xml");
When the XML file is saves the schmeaLocation doesn't have the "xsi:" prefix.
Anybody know why??
Please help!
Thanks in adavce,
Anil