5 Replies Latest reply on Nov 10, 2011 6:54 PM by John Hawkinson

    No line endings in ID-exported XML!

    Peter B. Bailey Level 1

      I exported a pretty big XML file. When I open it in my text editor (TextMate), there are no line endings. It took a while to open probably because of that. I asked the TextMate folks about it and they said that the file itself literally has no line endings. I've exported it again and the same thing happens. Why in the world doesn't InDesign populate the XML with any line endings?

       

      Thanks,

      Peter

        • 1. Re: No line endings in ID-exported XML!
          John Hawkinson Level 5

          Use a better editor?

          InDesign XML is UTF-8 with paragraph breaks in text fields marked with U+2029 (the paragraph seperator), which is encoded in hex bytes as 0xE2 0x80 0xA9.

           

          TextEdit will display it....

          Or maybe that's not what you meant?

           

          Like why they don't put newlines after each tag? Well, I dunno. I guess it's a little weird. Just replace > with >\n beforehand?

          • 2. Re: No line endings in ID-exported XML!
            Peter B. Bailey Level 1

            Well, TextMate is considered the best, except, of course, by those who consider BBEdit to be the best.

            I definitely don't expect newlines after each tag. I guess I should expect there to be newlines after each paragraph, though.

            • 3. Re: No line endings in ID-exported XML!
              John Hawkinson Level 5

              Umm, which editor to use is a Religious War. Please don't expect to say anything is "the best" and expect to get away with it unchallenged.

               

              TextMate is commercial Mac software. By defnition it's not multi-platform. It's also not open source. Perhaps it is best or very good in some domains, but I certainly have a lot of editing requirements for which each of those are deal-breakers, and so there's no way I would consider it "best." BBEdit loses on these two.

               

              (The traditional rivalry in the universe of text editors is Emacs versus vi.)

               

              In this case, it's pretty disappointing that you sent them a file and they said "the file itself literally has no line endings" because that's simply false. (Well, unless,  I guess, you sent them a file with no paragraph breaks?).

               

              Maybe they meant it in the xkcd.com/725 sense? You know:

              http://imgs.xkcd.com/comics/literally.png

              (Don't forget the little snarky alt-text underneath; highlight to show: "The chemistry experiment had me figuratively -- and then shortly thereafter literally -- glued to my seat.")

               

              Anyhow, if TextEdit can manage it, well, ouch, y'know?

               

              In fairness, in Emacs I did have to use M-x find-file-literally and M-x hexl-find-file to look at this file to decide, and I defnitely am off my game when it comes to Unicode and non-single byte encodings, but I wasn't quite sure how to ask emacs to deal with this properly, and the default display was not encouraging. Still, it certainly answered my question.

              • 4. Re: No line endings in ID-exported XML!
                Peter B. Bailey Level 1

                I honestly don't really care about editors. I refuse to be religious about this stuff. I've been a PC guy for 20 years and I've only been on the Mac now for about four months.

                When I open the file in TextMate, yes, there are absolutely no line endings anywhere in the file. The freebie TextEdit opens it fine, but, I think it's just wrapping to the screen.

                • 5. Re: No line endings in ID-exported XML!
                  John Hawkinson Level 5

                  The freebie TextEdit opens it fine, but, I think it's just wrapping to the screen.

                  Not for me under 10.6.8, no it is not.