Urgent: XML Parsing Error

jm's picture


I created the attached .sci file from the Slides_Beamer shell in SWP 6.0.28, saved it and closed down my computer for the night. This morning, when I try to open the file, SWP will not open it and gives me the error message:

XML Parsing Error: Location: file:///Users/malcomsj/Documents/Research/RelationalContracts/RelContRis... Line Number 2, Column 1:<?xml-stylesheet href="css/my.css" type="text/css"?> ^

How can I correct the parsing error to enable me to open the document?

I am running SWP 6 on a Mac with macOS High Sierra 10.13.6.

RelContRiskInvPresSITE.sci270.75 KB

The css directory was missing

The css directory was missing from inside the .sci file for some reason.  I copied in a css directory from a beamer document.  The attached can now be opened.

jm's picture

Many thanks for responding so

Many thanks for responding so quickly on this issue. Your corrected file seems to work fine.

Have you any idea how the css directory might have come to be missing from inside the .sci file? I hadn't even been looking inside the .sci file, let alone changing anything inside it. And I hadn't had any problems editing and previewing the document before I shut down my computer for the night.

Barry MacKichan's picture

Here is a fixed copy of your

Here is a fixed copy of your document.

jm's picture

This problem has just

This problem has just occurred to me again using SWP 6.0.29.

As a matter of urgency, please will you give me a step-by-step set of instructions for how to copy a CSS file from another SCI file into the problem SCI file on a Mac so that I can fix the problem myself.

I don't use a Macintosh for

I don't use a Macintosh for this, but the tools I use on Windows should also be available on Macintosh.  I'll describe the steps in a platform independent way.

1. I first create a new .sci document that is of the same type as the problem document.  Typically the documents are articles so I will use the Standard_LaTeX_Article or Blank_LaTeX_Article shell.  The other typical document type is beamer, so I have a separate beamer sample document.

2. I will save the new document with some name to create a .sci file.

3. I will use the archive program to open the .sci file.  The .sci file is structurally the same as a .zip file.

4. I will copy the css directory out of the .sci file to some directory on my hard disk. and exit the archive program.

5. I will open the damaged .sci file with the archive program.  Typically there is only a tex subdirectory and main.xhtml in the damaged .sci file.

6. I will copy the css directory from my hard disk into the damaged .sci file.

7. I will exit the archive program.

8. I can now open the problem .sci file using SW.

I use the freeware program 7-Zip as my archive program.  The Windows File Manager can also open .sci files.  I don't look at archive files on the Macintosh, but I expect that there is an equivalent for 7-Zip on the Macintosh.  Any program that can open .zip files should be useable.

jm's picture

Many thanks for the prompt

Many thanks for the prompt and very helpful response. I have just 2 comments:

1. The steps are essentially the same for Mac OS X. But, to unzip files using the archive app built into OS X, you first need to change the filetype from .sci to .zip and double-click on the .zip files. Then select the css folder from the undamaged .sci file and all the files and folders from the damaged .sci file, right-click on one of them and choose the menu option “Compress n items”, where n is the number of selected folders/files. That creates a file Archive.zip which then needs to have its filetype changed from .zip to .sci to be opened in SWP 6.

2. With my document, I noted that the "plots" folder was missing from the damaged .sci file as well as the css folder. I was able to remedy this by inserting the plots folder from a backup version of the document.

I had anticipated that this bug had been fixed in SWP 6.0.29 because I had observed it previously only in SWP 6.0.28 but that is obviously not the case. It should be a **very** high priority to be fixed in the next release.