[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

XML failing validation

Hey there,

I'm making an RSS feed and it's failing validation.  The error i'm getting is 'Undefined root element: channel '.  The way I understand XML is that there is always a root element.  Why am I getting this error if that's the case?  

I also read up on namespaces but it seems like overkill...I shouldn't have to use them right?


Here's what my XML file looks like :

<?xml version="1.0" encoding="utf-8"?>
<channel>
  <title>Newly Added Content</title>
  <link>http://insert_link_here</link>
  <description>Newly Added Portfolio Content</description>
  <item>
    <title>Glen and Heidi Wedding Video</title>
    <link>http://insert_link_here</link>
    <description><![CDATA[This is a short wedding intro I made for my sisters wedding.  I used After Effects to create comps and did the final edits in Adobe Premiere.  Photoshop(most graphics), Flash(closing credits sunset) and Illustrator(vines and flowers) were also used for asset creation.]]></description>
  </item>
  <item>
    <title>Omega Homes Promotional Video</title>
    <link>http://insert_link_here</link>
    <description><![CDATA[A promotional video I created for Omega Homes.  I used Adobe Premiere to arrange photos, scrolling text and the Protos watermark.  I also used Adobe Flash for the opening credits.]]></description>
  </item>
  <item>
    <title>Random XML scrolling content</title>
    <link>http://insert_link_here</link>
    <description><![CDATA[A demo project demonstrating random scrolling content using XML data.  A fictitious soccer team was the focus of the data.  The same item being displayed is never repeated in the animation.]]></description>
  </item>
</channel>

Open in new window


Help, please!
0
duder78
Asked:
duder78
  • 2
1 Solution
 
Geert BormansCommented:
RSS 2.0 has no namespaces, so you don't need it.
Stating it is overkill is not correct :-)

You need to wrap the channel in a rss tag

<rss version="2.0">
<channel>
  <title>Newly Added Content</title>
  <link>http://insert_link_here</link>
...
0
 
duder78Author Commented:
That did the trick, thank you.
0
 
Geert BormansCommented:
welcome
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now