Page 1 of 1

XML crashes Smultron / TextWrangler?

Posted: Wed Sep 06, 2006 4:17 am
by lorienken
For whatever reason, when I show package of a Mellel file and unzip the xml file and them attempt to open it in Smultron or TextWrangler, the app becomes virtually stuck and unresponsive, with the Force Quit window showing the app alternating between (Not Responding) and fine state. Does anybody else experience problem reading the Mellel xml file? Thanks.

Posted: Wed Sep 06, 2006 5:14 am
by d_h
A test document worked for me in TextWrangler

Posted: Wed Sep 06, 2006 6:35 am
by fitzgunnar
The xml file can be quite large, also for very simple document, and it can take quite some time to open it in a text editor. On my iBook G4 1.33 MHz 700 MB it took about 50 seconds to open a simple Mellel document in Smultron. (I guess it has something to do with the fact that the xml document more or less is printed on a single, very long line.)

/MagnusG!

Posted: Wed Sep 06, 2006 6:47 am
by zoul
If there is a problem with the one-big-line formatting, you can easily filter the main.xml through xmllint:

Code: Select all

$ xmllint --format main.xml > formatted.xml
I’m not sure whether the xmllint comes with the OS, but I’d say it does. The formatted version is also nicer when you want to peek at the internals of the XML format.

(BTW: I can open the XML file in TextWrangler without hassle.)

Posted: Wed Sep 06, 2006 7:51 am
by Stephen Still
fitzgunnar wrote:The xml file can be quite large, also for very simple document, and it can take quite some time to open it in a text editor. On my iBook G4 1.33 MHz 700 MB it took about 50 seconds to open a simple Mellel document in Smultron. (I guess it has something to do with the fact that the xml document more or less is printed on a single, very long line.)

/MagnusG!
I found this too. Try a smaller file.

Posted: Wed Sep 06, 2006 8:57 am
by lorienken
Thanks for the xmllint hint. It solved the hang-up problem.

Note to Redlers: although I seem to be alone with this problem (don't know why - my machine isn't that old - G5 iMac iSight 1.9 512MB 10.4.7) maybe the xmllint --format should be the default option? Having the xml file be one long line doesn't make it very easy to read, and apparently for me, or to open. Thanks.

Regards,

Ken

Posted: Wed Sep 06, 2006 11:22 am
by Eyal Redler
A preferences option for "pretty printing" xml is something we plan for the future...

Posted: Wed Sep 06, 2006 1:19 pm
by zoul
Why would anybody want to turn the indenting off? Does it impose some serious performance hit? (Just curious :)

Posted: Wed Sep 06, 2006 8:56 pm
by Eyal Redler
zoul wrote:Why would anybody want to turn the indenting off? Does it impose some serious performance hit? (Just curious :)
Not really. It just adds to the size of the file but it could be that we just need to always pretty print the file. When we implement this, we'll see what's the difference in file size and decide according to that.

Posted: Thu Sep 07, 2006 7:29 am
by Mart°n
Eyal Redler wrote:A preferences option for "pretty printing" xml is something we plan for the future...
Great news. I’ve also switched to Smultron some time ago and (even it may be the fault of Smultron) it could not be used with Mellel XML files. I’ve tried a smaller (one page) Mellel file and while it opened after some (or some more) seconds, every action you try to do (scrolling, editing) results in a spinning beachball (not of death).
The same file will be opened fast in an old version of SubEthaEdit, but I hoped I could replace that with Smultron.

Posted: Thu Sep 07, 2006 8:19 am
by zoul
Maria wrote:No need for the Redlers to blow up the file format.
Well it should not be exactly blowing up: My 75-page test document went up by 18 KB (~ 18 %) after indenting and recompressing, that should not be a big deal.

Posted: Thu Sep 07, 2006 8:22 am
by nvalvo
who would not?
I find Oxygen (like many of its Java brethren) to crawl — not too shabby feature set, though. BBEdit (or its free little brother TextWrangler) from BareBones Software has been my constant text editing companion for some years now. It'll handle a big file without flipping out, something Smultron can't really say.

Of course, now that we have grep searching in Mellel, I can't even think of a reason that I would want to edit a Mellel file in BBEdit! Edit: I just did. The diff features (to identify all differences between two files, or between versions of the same file) are really pretty fantastic. Now if Mellel had a well implemented Diff function, that would be pretty great...

Looking through the filetype is interesting from a "learn about how a word processor works" perspective. It hadn't really occurred to me how big all the style information is. Just saying, is all.