Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-30-2012, 05:51 PM   PM User | #1
crmpicco
Senior Coder

 
crmpicco's Avatar
 
Join Date: Jan 2005
Location: Mauchline, Scotland
Posts: 1,091
Thanks: 15
Thanked 1 Time in 1 Post
crmpicco has a little shameless behaviour in the past
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.
crmpicco is offline   Reply With Quote
Old 03-30-2012, 10:10 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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/
felgall is offline   Reply With Quote
Reply

Bookmarks

Tags
charset, rss, validation, xml

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:00 AM.


Advertisement
Log in to turn off these ads.