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 2 of 2
  1. #1
    Senior Coder crmpicco's Avatar
    Join Date
    Jan 2005
    Location
    Mauchline, Scotland
    Posts
    1,096
    Thanks
    15
    Thanked 1 Time in 1 Post

    Missing charset for text/xml document - w3 XML validation

    I have an issue with my Google Product Feed where I am getting two warnings when using the W3 XML validator. The two warnings are:

    Warning Missing "charset" attribute for "text/xml" document.
    Warning No DOCTYPE found! Checking XML syntax only.

    This is the top two lines of my XML file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" charset="UTF-8">
    I added the charset to the rss tag in an effort to clear the warnings. I passed the validation, but I think I need to clear these warnings for Google to accept the feed.

    Thanks.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You still don't have a doctype there. At a minimum you need <!doctype rss> in order to define the root element in the document.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Tags for this Thread

    Posting Permissions

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