"content is not allowed in prolog" using Oxygen for MXML files

I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on: <?xml version="1.0" encoding="utf-8"?> This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up? -- Joshua Noble jnoble@mindseye.com 617-350-0339 x 33 aim: METProfessor -----------------

I find this happening a lot with cut-and-paste producing invisible characters. Try opening a new document, typing that text in char-by-char, and see how it works out. --Paul On Jun 1, 2006, at 5:49 PM, Joshua Noble wrote:
I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on:
<?xml version="1.0" encoding="utf-8"?>
This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up?
-- Joshua Noble jnoble@mindseye.com 617-350-0339 x 33 aim: METProfessor
-----------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

On Thursday 01 June 2006 17:49, Joshua Noble wrote:
I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on:
<?xml version="1.0" encoding="utf-8"?>
This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up?
Nothing wrong with the above, except if you insert an extra space or a line before the <? Remove such space or any lines preceeding and it should work. Hope this helps. -- Ask me about the Monkey. Sean Wheller Technical Author sean@inwords.co.za +27-84-854-9408 http://www.inwords.co.za

Joshua Noble wrote:
I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on:
<?xml version="1.0" encoding="utf-8"?>
This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up?
Joshua, Triple check that there is no whitespace before this line. It's opening < should be the very first character. -James -- Dr James Cummings, Oxford Text Archive, University of Oxford

I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on: <?xml version="1.0" encoding="utf-8"?> This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up?
I would not be at all suprised if there were an extraneous invisible character somewhere in there, likely before the initial "<". This problem catches me every time I copy something from Emacs into oXygen on a Macintosh. (Perhaps a BOM?)

Hi Joshua, If you open your message from the list archive http://www.oxygenxml.com/pipermail/oxygen-user/2006-June/000804.html in oXygen for instance, you can see that the line you entered as the beginning of your document starts with a character encoded as a character reference with the code 65279 & #65279;<?xml version="1.0" encoding="utf-8"?> (one space added after the first & to avoid having the character reference replaced with the actual character by some email clients) 65279 is in hexa FEFF, that is the BOM for UTF-16 Big Endian encoding. Your document specifies UTF-8 as encoding thus the UTF-16 BOM is not ignored when opening the document and ends up as an invisible character before the XML header. Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Joshua Noble wrote:
I'm trying to use Oxygen to edit MXML files (Macromedia Flex). Everything works fine except that this error always appears: content is not allowed in prolog. What's up with this? Here's the line it chokes on:
<?xml version="1.0" encoding="utf-8"?>
This is the way all Flex files start and there don't seem to be any problems there. Anybody know what's up?
participants (6)
-
George Cristian Bina
-
James Cummings
-
Joshua Noble
-
Paul Everitt
-
Sean Wheller
-
Syd Bauman