Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts

    What does this error mean?

    XML Parsing Error: not well-formed
    Location: https://istop2shop.com/index.php?pag...e&do=edit&id=3
    Line Number 1, Column 12:application/unknown0<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    -----------^

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Can you show us the source of the site as well? (My browser won't show it because it's using a broken certificate.)


    As it looks right now, from the little information you've given us:
    - The content type should not be application/unknown, it should be the appropriate one for whatever you indend to us the document for, i.e. probably one of application/xml, application/xhtml+xml or text/html.
    - It looks as if the literal text "application/unknown0" is part of the content, which it should not be. (column 12 would be the "/" in application/unknown)
    - It could be that the XML parser expected a root element (<html></html>) before the end of the file but didn't find it. I don't see why that would indicate an error on col 12 though.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I get this error when I try to upload a video on the website. So I guess the docu type needs to be video?

  • #4
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I think it's this part.

    Code:
    $charset = "utf-8";
       $mime = "text/html";
    
       if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
           // if there's a Q value for "application/xhtml+xml" then also
           // retrieve the Q value for "text/html"
           if(preg_match("/application\/xhtml\+xml;q=0(\.[1-9]+)/i",
                                $_SERVER["HTTP_ACCEPT"], $matches)) {
                $xhtml_q = $matches[1];
                if(preg_match("/text\/html;q=0(\.[1-9]+)/i",
                                     $_SERVER["HTTP_ACCEPT"], $matches)) {
                    $html_q = $matches[1];
                    // if the Q value for XHTML is greater than or equal to that
                    // for HTML then use the "application/xhtml+xml" mimetype
                    if($xhtml_q >= $html_q) {
                         $mime = "application/xhtml+xml";
    	                }
                }
           // if there was no Q value, then just use the
           // "application/xhtml+xml" mimetype
           } else {
                $mime = "application/xhtml+xml";
           }
       }
       // output the mime type and prolog type
       header("Content-Type: $mime;charset=$charset");
       header("Vary: Accept");
    }
    Last edited by masterofollies; 08-23-2008 at 01:25 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •