# Validating atom and rss locally?

**URL:** <https://www.ruby-forum.com/t/validating-atom-and-rss-locally/77756>\
**Category:** Ruby\
**Created:** [November 30, 2006, 8:43am UTC](https://www.ruby-forum.com/t/validating-atom-and-rss-locally/77756 "2006-11-30T08:43:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsanheim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Post date:** [November 30, 2006, 8:43am UTC](https://www.ruby-forum.com/t/validating-atom-and-rss-locally/77756/1 "2006-11-30T08:43:06Z")

</div>

I was wondering if there are libraries to validate rss 2.0 and atom  
locally, for testing purposes? I am aware of FeedValidator gem, but  
I’d like to validate w/o having to make a web service call to the  
“official” validator to keep the test running fast. There are plenty  
of feed parsing libraries, but I’m sure many of them can parse things  
that aren’t necessarily valid and may not care about validity if the  
xml is close enough.

thanks,

- rob

---

<div class="post-metadata">

**Author:** ![rsanheim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Post date:** [November 30, 2006, 12:39pm UTC](https://www.ruby-forum.com/t/validating-atom-and-rss-locally/77756/2 "2006-11-30T12:39:35Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“validating atom and rss locally?” on Thu, 30 Nov 2006 16:42:48 +0900,  
“Rob S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I was wondering if there are libraries to validate rss 2.0 and atom  
> locally, for testing purposes? I am aware of FeedValidator gem, but  
> I’d like to validate w/o having to make a web service call to the  
> “official” validator to keep the test running fast. There are plenty  
> of feed parsing libraries, but I’m sure many of them can parse things  
> that aren’t necessarily valid and may not care about validity if the  
> xml is close enough.

Developing version of RSS Parser can validate RSS 2.0 and  
Atom. The version of RSS Parser is here:  
[http://www.cozmixng.org/repos/rss/trunk](http://www.cozmixng.org/repos/rss/trunk)

I don’t put those changes into Ruby’s repository yet because  
Atom support is still unstable and not complete. API of the  
developing version may be changed. But parsing API will not  
be changed.

require ‘rss’

begin  
RSS::Parser.parse(File.read(“/…/test.atom”), true, false)  
puts “OK”  
rescue RSS::Error  
puts “#{$!.class}: #{$!.message}”  
end

Thanks,
