It may surprise some people that the Lectora project file, that .awt file, is actually XML. Big flipping deal? Well, maybe. In making this file XML, Lectora is allowing developers to make changes to it without going through the Lectora interface.
Editing the XML directly allows you to perform some tasks much quicker than using Lectora itself. For example, you can search and replace text to change the video sizes in your project. You can even automate the course creation process. For example, I have a Lectora project template for video-based content. I created an automated process that takes a list of videos and turns it into a new Lectora project based on the template saving me hours of work.
Break open a Lectora project of your choice in your favorite XML or text editor. Let’s take a look at the XML and see how you can use it. The top level of a Lectora project is tagged as lectoratitle. This section contains four sections:
- titledata - contains basic title information such as the title type (e.g. AICC) and a title ID.
- resourcedata - contains all the resources that are in the title including images, animations, and more.
- variabledata - contains definitions for all user defined variables in your project.
- objectdata - contains all information about chapters, quizzes, pages, and more.
- Chapters - chapter
- Pages - page
- Actions - action
- Groups - objgroup
- Animations - animimage
- Images - image
- Text - text
- Videos - video
- And more...
Now that you know a little about the XML file structure, let’s use it to your advantage! The tag for a video is as follows:
<video autostart=”true” displaycontroller=”true” id=”7473” parent=”7471” videotype=”standard”></video>
Are you thinking what I’m thinking? Search and replace. In your favorite text editor, search for <video autostart=”true” and replace with <video autostart=”false”. This will change the settings for all videos so use wisely. Which brings me to a best practice: Always backup the Lectora project file before monkeying around with the XML!
Let’s take the same example again. Your client has given you a new set of videos but the dimensions of the video have changed from 640x480 to 800x600. A search and replace can go a long way here to. Each video has the size as a part of the XML data as follows:
<size>
<cx>640</cx>
<cy>480</cy>
</size>
You can again, do some quick batch changes to your project that would take much longer if you were using the Lectora interface.
I suggest opening up the Lectora .awt project file in your favorite text or XML editor and exploring what’s in there. An editor with color coding and automatic formatting will help a lot. Make a small change then load it back into Lectora to verify the change has been made in your project.
Being familiar with the XML will help you next time batch changes need to be made to your project. Having experienced a deep dive into the project file XML could prove very insightful!