impression logo

Impression Learning Content Framework

Support Article
Last modified: 28 November 2012

XML Format

This appendix describes the XML format of the objects in the impression.persistence namespace.

Lesson

The Lesson object's XML format is:

<lesson lessonID=[lessonID] title=[lesson title] identifier=[lesson identifier] documentID=[documentID] classification=[classification]>
    <ppc name="properties">…</ppc>
    <maps default=[default]>…</maps>
    <storyboards>…</storyboards>
</lesson>

Elements

The Lesson object's XML format has the following elements:

ElementDescription
<lesson>Root element.  The lessonID, title, identifier, documentID, and classification attributes contain the values of the lessonID, title, identifier, documentID, and classification properties, respectively.
<ppc>A PersistedPropertiesCollection XML element containing the lesson's properties collection.
<maps>A LessonMapCollection XML element containing the lesson's maps collection.
<storyboards>A StoryboardCollection XML element containing the lesson's storyboards collection.

LessonMapCollection

The LessonMapCollection object's XML format is:

<maps default=[default map name]>
    <map...
    <map...
    ...
</lesson>

Elements

The LessonMapCollection object's XML format has the following elements:

ElementDescription
<maps>Root element.  The default attribute contains the value of the LessonMap object to use as the collection's defaultMap.
<map>A LessonMap XML element.

LessonMap

The LessonMap object's XML format is:

<map name=[name]>
    <item sbid="00000000-0000-0000-0000-000000000001" />
    <item sbid="00000000-0000-0000-0000-000000000002" />
    <item sbid="00000000-0000-0000-0000-000000000003">
        <item sbid="00000000-0000-0000-0000-000000000004" />
        <item sbid="00000000-0000-0000-0000-000000000005" />
        ...
    </item>
    <item sbid="00000000-0000-0000-0000-000000000006" />
</map>

Elements

The LessonMap object's XML format has the following elements:

ElementDescription
<map>Root element.  The name attribute contains the value of the object's name property.
<item>Individual storyboard reference.  The sbid attribute is a String containing the storyboard unique identifier (the sbid property) for the storyboard at item's location.

Remarks

The hierarchical order of the <item> elements defines the structure of the map.  A nested <item> element will appear as a child of the parent <item> element.

Note that the LessonMapController object's labelMap method will add an additional attribute to each <item> element.

StoryboardCollection

The StoryboardCollection object's XML format is:

<storyboards>
    <storyboard...
    <storyboard...
    ...
</storyboards>

Elements

The StoryboardCollection object's XML format has the following elements:

ElementDescription
<storyboards>Root element.
<storyboard>A Storyboard XML element.

Remarks

No ordering is implied for <storyboard> elements.

Storyboard

The Storyboard object's XML format is:

<storyboard sbid="00000000-0000-0000-0000-000000000001"
            title=[storyboard title]
            identifier=[storyboard identifier]
            type=[storyboard type]
            classification=[classification]
            shortid=[short id]>
    <ppc name="properties">…</ppc>
    <cec name="children">…</cec>
</storyboard>

Elements

The Storyboard object's XML format has the following elements:

ElementDescription
<storyboard>Root element.  The sbid, title, identifier, type, classification, and shortID attributes contain the values of the sbid, title, identifier, sbType, classification, and shortID properties, respectively.
<ppc>A PersistedPropertiesCollection XML element containing the storyboard's properties collection.
<cec>A ChildElementCollection XML element containing the storyboard's children collection.

Remarks

If identifier is "", it may be omitted..

ChildElementCollection

The ChildElementCollection object's XML format is:

<cec name=[collection name]>
    <ce...
    <ce...
    ...
</cec>

Elements

The ChildElementCollection object's XML format has the following elements:

ElementDescription
<cec>Root element.  The name attribute contains the value of the object's name property.
<ce>A ChildElement XML element.

Remarks

A ChildElementCollection is an ordered collection of ChildElement objects.  Elements are ordered within the object in the same order in which they appear in the XML.

ChildElement

The ChildElement object's XML format is:

<ce name=[element name] type=[element type]>
    [persisted property value]
    [persisted property value]
    ...
</ce>

Elements

The ChildElement object's XML format has the following elements:

ElementDescription
<ce>Root element.  The name and type attributes contain the values of the name and elementType properties, respectively.
[persisted property value]Individual persisted property value.

Remarks

A ChildElement object is a superset of a PersistedPropertiesCollection object.  For more information about persisted property values in XML, see the section on PersistedPropertiesCollection XML, below.

PersistedPropertiesCollection

The PersistedPropertiesCollection object's XML format is:

<ppc name=[collection name]>
    [persisted property value]
    [persisted property value]
    ...
</ppc>

Elements

The PersistedPropertiesCollection object's XML format has the following elements:

ElementDescription
<ppc>Root element.  The name attribute contains the value of the name property.
[persisted property value]Individual persisted property value.

Property Elements

Individual persisted property values can be one of any number of types, as listed next.

<boolProp name=[element name] value=[element value] />

Boolean property.  value contains the Boolean value of the property.

<intProp name=[element name] value=[element value] />
<floatProp name=[element name] value=[element value] />

Number  properties.  value contains either the integer (intProp) or floating-point (floatProp) value of the property.

<stringProp name=[element name]>[element value]</stringProp>

String property.  The property value is stored as the inner text of the  <stringProp> element.

<colorProp name=[element name] value=[element value] />

ColorData property.  value contains the value of the property, in HTML color format.

<fontProp name=[element name] familyName=[value] emSize=[value]
          bold=[value] italic=[value] underline=[value]/>

FontData property.  The familyName, emSize, bold, italic, and underline attributes all identify the values passed to the FontData constructor.

<rectProp name=[element name] left=[value] top=[value]
          width=[value] height=[value]/>

Rectangle property.  The left, top, width, and height attributes all identify the values passed to the Rectangle constructor.

<assetProp name=[element name] filename=[value] >
    <description>[file description]</description>
    <source>[source files information]</source>
</assetProp>

AssetData property.  The filename attribute contains the value of the filename property.  If the <description> element is present, the inner text of the element is used for the value of the description property.  If the <source> element is present, the inner text of the element is used for the value of the source property.

<locationProp name=[element name] from=[value] to=[value] map=[value]/>

LocationData property.  The from, to, and map attributes all identify the values passed to the LocationData constructor.

<ppcProp name=[element name] >[ppc data]</ppcProp>

PersistedPropertiesCollection property.  The data for the collection is stored as the child of the <ppcProp> element, and is stored in PersistedPropertiesCollection (where <ppc> is the root element) XML format.

<cecProp name=[element name] >[cec data]</cecProp>

ChildElementCollection property.  The data for the collection is stored as the child of the <cecProp> element, and is stored in ChildElementCollection (where <cec> is the root element) XML format.

Encoded Elements

Any element can be base64-encoded to obfuscate content and prevent casual viewing.  The Impression CCT can encode persisted properties that relate to questions, including (some) questions, answers, and distractors, as well as feedback and remediation messages.  The format for a base64-encoded property is:

<encProp [enctype="utf8"]>[element value]</encProp>

Where [element value] is a Base64-encoded string containing the string representation of one of the property element XML formats listed above.  If the enctype attribute is present and contains the value utf8, then the string data was created using a "UTF8 byte-encoded" version of the source data.  Support for the enctype attribute was added to all Impression components (including the CCT, the dev kits, and the Connect SDK) starting with the first 2015 releases.

Remarks

No ordering is implied within a PersistedPropertiesCollection XML element.