Org-mode: org-export-as-html is detected as XML, not HTML

I am exporting my org-mode file via org-export-as-html, but when I check the file type via file my/file.html, it is XML. I notice the first three lines in my HTML exported file is the following:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


which is a reasonable explanation. If I manually re-order these lines to the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


then the file is correctly identified as HTML. How do I correct this issue in my export function? I checked the org-mode docs here but they seem out of date:

http://orgmode.org/manual/HTML-Export-commands.html#HTML-Export-commands

because I do not have their listed commands, but org-export-to-html and org-export-as-html-to-buffer.

Any suggestions would be very helpful.

BTW I am on Emacs 24.3 with Ubuntu 14.04. Here are the first few lines of my org file:

Flatsheet Project Mgmt -*- mode: org -*-
#+TODO: TODO IN-PROGRESS WAITING DONE
#+INFOJS_OPT: view:overview toc:true

* project stuff...
* more project stuff...


UPDATE

I found this link potentially helpful, but their suggestion is not working:

http://doc.norang.ca/org-mode.html

There is a section called 16.8.2 Export HTML without XML header, but their solution below does not work for me:

(setq org-html-xml-declaration (quote (("html" . "")
("was-html" . "<?xml version=\"1.0\" encoding=\"%s\"?>")
("php" . "<?php echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>"))))

• when you do org-version what do you get, and did you try setting the equivalent of org-html-doctype? – pjammer Feb 25 '15 at 12:00
• XHTML is an XML document. Why do care what file says? – rekado Feb 25 '15 at 13:20
• @rekado Because my static "web server" (aka Amazon S3) was detecting the file at XML, thus it was not loading the javascript/css properly. – modulitos Feb 25 '15 at 13:46
• @pjammer you were right, I did not update my org package, which is apparently under heavy development. I was at 7.9x, but I upgrade to the latest stable and it works! It looks like they redid the exporter, which should make everything smoother from here on out :-) – modulitos Feb 25 '15 at 13:49
• In this case you may answer your question yourself. – rekado Feb 25 '15 at 14:07

When re-installing a package, just be sure to delete any existing org package directory under .emacs/elpa/org... and restart emacs with emacs -q and THEN install the latest package to avoid conflicts! YMMV but it worked for me.