Importing and Exporting
Our editors allow you to work with your content online, anywhere, anytime, without needing to keep track of files on your local hard drive. While this works in most cases, there are also times when authors or developers would prefer working in an offline environment. Similarly, many authors with existing Word, OpenOffice, or LaTeX documents do not want to have to start over with a new document. The following sections describe the import and export options available to you through our platform, along with links to resources to help get you started.
Importing a Module
There are several types of importers to help authors quickly upload and convert existing word processor documents into CNXML modules. These importers were designed to accommodate as many common cases as possible, but do require a certain degree of preparation to ensure that the documents are imported as accurately and completely as possible. If you are looking to import content, please be sure to read all of the documentation and template information provided before using the importer.
The following importers are provided for working with existing or external content:
- Word/OpenOffice Importer
You can use the Word/OpenOffice importer to import *.doc files and convert them to CNXML modules. You can use either Microsoft Word or an open source editor like OpenOffice Writer that allows you to save in the *.doc format to prepare your document. In either case, be sure to save with file extension *.doc, or as the Microsoft Word 97-2003 compatible version. The following links provide resources to help get you started:
- View the Word Importer help page
- Download the Word Importer template (.dot)
- Download the Word Importer example document (.doc)
Remember that using the Word/OOo importer will overwrite any existing content, so only use this method when working with a new module or when you are sure you don't mind starting over.
- LaTeX Importer
You can use the LaTeX importer to import .tex files (packed as a .zip file along with embedded media files) and convert them to CNXML modules. The following links provide resources to help get you started:
Remember that importing a LaTeX document into a module will overwrite any existing content, so only use this method when working with a new module or when you are sure you don't mind starting over.
IMPORTANT: Please be sure to read all of the instructions in the help file and template very carefully, particularly the list of supported LaTeX packages. The vast majority of LaTeX importer errors are the result of using an unsupported package.
- Plain CNXML Importer
For authors wishing to develop CNXML files in an external editor, you can upload your files using the Plain CNXML Importer. This importer will overwrite the current CNXML module with the contents of the file provided, so only use this method when working with a new module or when you are sure you don't mind starting over.
Several authors have asked if we provide support for offline CNXML editing. While we do not currently provide such support, we are interested in developing this at some point in the future provided there is sufficient interest for our authors. If you would be interested in contributing to this development, please email firstname.lastname@example.org and let us know!
- ZIP Importer
The ZIP Importer is unique in that it is the only importer that does not necessarily overwrite the contents of the module. The contents of the .zip file are uploaded to the Files tab of the module, replacing/updating any contents of the same name that already exist.
- If the ZIP file contains a file called index.cnxml, then the module contents are overwritten just as they are with the Plain CNXML importer.
- If the ZIP file contains files with the same name as previously attached files, then those files are replaced with the new version. This feature makes the ZIP importer a convenient way to update several images, downloads, or other supporting resources at once.
- If the ZIP file contains files which are not already attached to the module, then those files are added just as if they had been added manually through the Files tab. This feature makes the ZIP importer a convenient way to "batch upload" several new supporting resources at once.
Note: The module file structure does not support folders or subdirectories. Any folders or subdirectories in the zip file that you import into a module will be ignored.
Using the module importers
- If you have not already done so, create a new blank module.
- Use the help documents linked above to ensure you have prepared your document correctly; otherwise you may get an error.
- The importer dropdown menu is accessible on both the module
Contenttab and the
Filestab when editing the module. Choose the importer type from the dropdown menu and click
- On the next page, browse to your saved file on your harddrive and click
You can mix and match any of the different importer types to meet your needs; for example, you can upload new files while simultaneously updating existing images, replace the index.cnxml file without affecting other existing resources, etc. This importer can be used as a batch uploader, as an extension of the Plain CNXML importer, or in conjunction with with the ZIP exporter.
Importing a Collection
Importing collections is currently not supported; however, we have recently begun laying the groundwork to make this feature available at some point in the future. If you are a developer and would like more information regarding the current support of exported or third-party CollXML documents, please contact email@example.com for assistance.
Exporting a Module
You can export a module for offline editing, to create a backup of your content, or to use with an external platform that supports the use of CNXML documents. You can export a module from your workgroup by checking it out and using the "Export" menu in the module editor:
There are two options available for exporting modules:
- Plain CNXML allows you to download the CNXML file for the module, which contains all of the module text and CNXML markup. The exported file is titled "<moduleid>-plain.cnxml", where <moduleid> is the module's ID number.
- Zip File allows you to download the module's CNXML file (titled "index.cnxml") along with all attached resource files (such as embedded images, downloadable handouts, etc.).
Exporting a Collection
You can use the collection export feature to download a copy of a collection for external use. There are two versions of the collection available:
- The complete version, which includes information about the collection structure as well as the complete contents of all component modules.
- The CollXML-only version, which includes only the structural information for the collection and does not include component modules.
Collection authors can also download both versions of the collection export file from their workgroup after publishing a collection, and can download the CollXML-only version from any checked-out collection.
IMPORTANT: There is currently no support for importing collections, including those exported through this feature. At present, the collection export feature is provided primarily for developers interested in taking advantage of existing content for use with external platforms supporting CollXML/CNXML documents.
The Collection Export File (complete version)
The complete exported collection is packaged as a ZIP file titled "<collectionid>_<version>_complete.zip", where <collectionid> and <version> are the collection's ID and version number, respectively. Once expanded, this version of the exported collection contains the following:
- A CollXML document (titled "<collectionid>_<version>_collection.xml") describing the collection's structure.
- For each component module, a folder titled "<moduleid>" (the module's ID). Each of these folders contains:
- The CNXML document for the module (titled "index.cnxml").
- Any resource files, such as embedded images or downloadable handouts, that are attached to the module.
The Collection Export File (CollXML-only version)
The structure-only version of the exported collection is available as a downloadable CollXML document titled "<id>_<version>_collection.xml", where <id> and <version> are the collection's ID and version number, respectively. The CollXML file contains information about the collection including references to component modules, the order in which they are presented in the collection, and chapter/section information, along with a copy of the collection metadata.
For more information regarding the contents of the collection export file, please see the CollXML help page.