I have the following XML file, its SCORM for learning management system and I am having real problems with it.
<?xml version="1.0" encoding="utf-8" ?>
<manifest identifier="Privacy101" version="1.0"
xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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">
<metadata>
<schema>ADL SCORM</schema>
<schemaversion>1.2</schemaversion>
<lom xmlns="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd">
<general>
<title>
<langstring xml:lang="x-none">Privacy 101</langstring>
</title>
<catalogentry>
<catalog>Macromedia Captivate Course</catalog>
<entry>
<langstring xml:lang="x-none">Privacy101</langstring>
</entry>
</catalogentry>
<description>
<langstring xml:lang="x-none">A quick course on Internet Privacy</langstring>
</description>
<keyword>
<langstring xml:lang="x-none"></langstring>
</keyword>
</general>
<lifecycle>
<version>
<langstring xml:lang="x-none">1.0</langstring>
</version>
<status>
<source>
<langstring xml:lang="x-none">LOMv1.0</langstring>
</source>
<value>
<langstring xml:lang="x-none">Final</langstring>
</value>
</status>
</lifecycle>
<metametadata>
<metadatascheme>ADL SCORM 1.2</metadatascheme>
</metametadata>
<technical>
<format>text/html</format>
<location>.</location>
</technical>
<educational>
<typicallearningtime>
<datetime>00:05:00</datetime>
</typicallearningtime>
</educational>
<rights>
<cost>
<source>
<langstring xml:lang="x-none">LOMv1.0</langstring>
</source>
<value>
<langstring xml:lang="x-none">no</langstring>
</value>
</cost>
<copyrightandotherrestrictions>
<source>
<langstring xml:lang="x-none">LOMv1.0</langstring>
</source>
<value>
<langstring xml:lang="x-none">no</langstring>
</value>
</copyrightandotherrestrictions>
</rights>
<classification>
<purpose>
<source>
<langstring xml:lang="x-none">LOMv1.0</langstring>
</source>
<value>
<langstring xml:lang="x-none">Idea</langstring>
</value>
</purpose>
<description>
<langstring xml:lang="x-none">A quick course on Internet Privacy</langstring>
</description>
<keyword>
<langstring xml:lang="x-none">Macromedia Captivate</langstring>
<langstring xml:lang="x-none"></langstring>
</keyword>
</classification>
</lom>
</metadata>
<organizations default="Privacy101_ORG">
<organization identifier="Privacy101_ORG">
<title>Privacy 101</title>
<item identifier="P1" isvisible="true" identifierref="P1_RES">
<title>Browser Options</title>
<adlcp:maxtimeallowed></adlcp:maxtimeallowed>
<adlcp:datafromlms></adlcp:datafromlms>
<adlcp:masteryscore>80</adlcp:masteryscore>
<adlcp:timelimitaction>exit,message</adlcp:timelimitaction>
</item>
</organization>
</organizations>
<resources>
<resource identifier="P1_RES" type="webcontent" href="Simulation.htm" adlcp:scormtype="sco">
<file href="Simulation.swf"/>
<file href="Simulation.htm"/>
<file href="SCORM_support/scorm_support.htm"/>
<file href="SCORM_support/scorm_support.js"/>
<file href="SCORM_support/scorm_support.swf"/>
</resource>
</resources>
My first problem is that I cant seem to get hold of any of the elements. I have tried a few methods but would like to use linqtoxml if possible.
I have tried the code below :
XDocument xdoc = XDocument.Load(@"C:\Users\Stephen Liversidge\Desktop\SCORM Examples\1.2\cookies\unzipped\imsmanifest.xml");
var lv1s = from docEls in xdoc.Root.Elements("manifest")
select docEls;
I am having no joy though, no matter what element I try to attach too, I get an enumeration yeilded no results method.
I have a feeling this is an easy one, but I am struggling to get a start point.
Could you help please.
thanks
Stephen