<?xml version="1.0" encoding="UTF-8"?>
<manifest identifier="D2L_1000000179" xmlns:d2l_2p0="http://desire2learn.com/xsd/d2lcp_v2p0" xmlns="http://www.imsglobal.org/xsd/imscp_v1p1">
<resources>
<resource identifier="res_question_library" type="webcontent" d2l_2p0:material_type="d2lquestionlibrary" d2l_2p0:link_target="" href="questiondb.xml" title="Question Library" />
<resource identifier="res_quiz_1000000179" type="webcontent" d2l_2p0:material_type="d2lquiz" d2l_2p0:link_target="" href="quiz_d2l_1000000179.xml" title="Quiz to test D2L import" />
</resources>
</manifest>
I want to create this xml file .
but when i am creating this using Xelement or XmlElemenmt i am getting this one
<?xml version="1.0" encoding="UTF-8"?>
<manifest identifier="D2L_1000000179" xmlns:d2l_2p0="http://desire2learn.com/xsd/d2lcp_v2p0" xmlns="http://www.imsglobal.org/xsd/imscp_v1p1">
<resources>
<resource identifier="res_question_library" type="webcontent" material_type="d2lquestionlibrary" link_target="" href="questiondb.xml" title="Question Library" />
<resource identifier="res_quiz_1000000179" type="webcontent" material_type="d2lquiz" link_target="" href="quiz_d2l_1000000179.xml" title="Quiz to test D2L import" />
</resources>
</manifest>
here d2l_2p0:material_type is coming like material_type.
some one help me to create this using .net framework.
code for this is here below
private void createMenifetData(string destPath, long listExam)
{
XmlDocument xDoc = new XmlDocument();
XmlDeclaration xmlDeclaration = xDoc.CreateXmlDeclaration("1.0", "UTF-8", "");
XmlElement rootnode = xDoc.CreateElement("manifest");
xDoc.InsertBefore(xmlDeclaration, xDoc.DocumentElement);
rootnode.SetAttribute("identifier", "D2L_" + listExam.ToString());
rootnode.SetAttribute("xmlns:d2l_2p0", "http://desire2learn.com/xsd/d2lcp_v2p0");
rootnode.SetAttribute("xmlns", "http://www.imsglobal.org/xsd/imscp_v1p1");
XmlElement resources = xDoc.CreateElement("resources");
XmlElement resource = xDoc.CreateElement("resource");
resource.SetAttribute("identifier", "res_question_library");
resource.SetAttribute("type", "webcontent");
resource.SetAttribute(@"d2l_2p0:material_type", "d2lquestionlibrary");
resource.SetAttribute(@"d2l_2p0:link_target", "");
resource.SetAttribute("href", "questiondb.xml");
resource.SetAttribute("title", "Question Library");
resources.AppendChild(resource);
XmlElement resource1 = xDoc.CreateElement("resource");
resource1.SetAttribute("identifier", "res_quiz_" + listExam);
resource1.SetAttribute("type", "webcontent");
resource1.SetAttribute(@"d2l_2p0:material_type", "d2lquiz");
resource1.SetAttribute(@"d2l_2p0:link_target", "");
resource1.SetAttribute("href", "quiz_d2l_" + listExam + ".xml");
resource1.SetAttribute("title", "Quiz to test D2L import");
resources.AppendChild(resource1);
rootnode.AppendChild(resources);
xDoc.AppendChild(rootnode);
xDoc.Save(destPath + "\\imsmanifest.xml");}