I would like to know if its is possible to merge these elements with different namespaces;
<imsss:objectives>
<imsss:primaryObjective objectiveID="ettiquette_completed"/>
<imsss:objective objectiveID="previous_sco_completed">
<imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.forcedsequential.playing_completed" readNormalizedMeasure="true" readSatisfiedStatus="true" />
</imsss:objective>
</imsss:objectives>
<adlseq:objectives>
<adlseq:objective objectiveID="ettiquette_completed">
<adlseq:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.forcedsequential.ettiquette_completed" readCompletionStatus="true" writeCompletionStatus="true"/>
</adlseq:objective>
<adlseq:objective objectiveID="previous_sco_completed">
<adlseq:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.forcedsequential.playing_completed" readCompletionStatus="true" writeCompletionStatus="false"/>
</adlseq:objective>
</adlseq:objectives>
so basically I would like to end up with
<imsss:objectives>
<imsss:primaryObjective objectiveID="ettiquette_completed">
<imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.forcedsequential.ettiquette_completed" readCompletionStatus="true" writeCompletionStatus="true"/>
</imsss:primaryObjective>
<imsss:objective objectiveID="previous_sco_completed">
<imsss:mapInfo targetObjectiveID="com.scorm.golfsamples.sequencing.forcedsequential.playing_completed" readNormalizedMeasure="true" readSatisfiedStatus="true" readCompletionStatus="true" writeCompletionStatus="false/>
</imsss:objective>
</imsss:objectives>
At the moment I have a linq query that puts all elements together with the same objectiveid attribute;
XElement seqColl = getSequencingCollection(identifier);
var ImssObj = seqColl.Element(imsss + "objectives").Elements();
var AdlObj = seqColl.Element(adlSeq + "objectives").Elements();
var newEl = from o in ImssObj
join a in AdlObj on o.Attribute("objectiveID").Value equals a.Attribute("objectiveID").Value
select new XElement(o.Name, new XAttribute(o.Attribute("objectiveID")), o.Elements(), a.Elements());
(the getSequencingCollection method works correctly to get all sequencing information from the xml, as it needs to get local sequencing and shared sequencing)
Thanks all.
well i’ve done quite a specific solution to this, if anyone wants to see it then let me know. I cant imagine it would help anyone though. BUT if you know of a different way rather than a long c# function ive used then please feel free to let me know. Thanks