CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   XML (http://www.codingforums.com/forumdisplay.php?f=3)
-   -   Missing charset for text/xml document - w3 XML validation (http://www.codingforums.com/showthread.php?t=255692)

crmpicco 03-30-2012 05:51 PM

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.

felgall 03-30-2012 10:10 PM

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.


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.