This section describes how to work with OOXML documents in Archive View. The following procedures are discussed:
OOXML files are created via the Create New Document dialog (File | New command), in which you select the required file type (.docx, .pptx, or .xlsx). You are prompted for a file name and a location at which to save the file. The new file is created at the specified location and then opened in Archive View (screenshot below). Notice that the basic internal structure of the OOXML document has been created.
An existing OOXML file is opened in Archive View via the Open dialog (File | Open) of XMLSpy. OOXML files are saved with the File | Save (Ctrl+S) command. This command saves the structure and relationships of the OOXML file.
The contents of an OOXML file can be modified by adding and deleting folders and documents to it using Archive View functionality. After these structural changes have been made, the OOXML file must be saved (File | Save) for the modifications to take effect. You should note the following points:
•When a new folder or document is added using the command buttons in Archive View, it should be named immediately on its being created. It is not possible to rename a folder or document in Archive View.
•After a new document has been added to an archive folder, it is saved to the archive by saving it in its own window or by saving the OOXML file.
An internal OOXML document—that is, a document within an OOXML file package—is opened from Archive View by double-clicking it, or by selecting it in the Main Window and clicking the Open document command button. The document opens in a separate XMLSpy window. After editing it, simply save the document to save it back to the OOXML archive; there is no need to save the OOXML file itself.
XMLSpy provides intelligent editing features for internal Office Open XML documents—that is, for documents within an OOXML file package. These features include entry helpers, auto-completion, and validation.
Documents in OOXML files can be addressed using normal file paths plus the pipe character. For example, the file path:
C:\Documents and Settings\<username>\My Documents\Altova\XMLSpy2020\Examples\Office20XX\ExcelDemo.xlsx|zip\xl\tables\table1.xml
locates the file table1.xml, which is in the xl\tables folder of the OOXML file ExcelDemo.xlsx located in the Examples\Office20XX folder of the XMLSpy examples folder.
When an OOXML file is open in Archive View, you can compare it with another archive by using the command Tools | Compare Directories.