Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 71519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:54:02+00:00 2026-05-10T19:54:02+00:00

Is there any way to read a collection of extension elements with Universal Feed

  • 0

Is there any way to read a collection of extension elements with Universal Feed Parser?

This is just a short snippet from Kuler RSS feed:

<channel>   <item>     <!-- snip: regular RSS elements -->     <kuler:themeItem>       <kuler:themeID>123456</kuler:themeID>       <!-- snip -->       <kuler:themeSwatches>         <kuler:swatch>           <kuler:swatchHexColor>FFFFFF</kuler:swatchHexColor>           <!-- snip -->         </kuler:swatch>         <kuler:swatch>           <kuler:swatchHexColor>000000</kuler:swatchHexColor>           <!-- snip -->         </kuler:swatch>       </kuler:themeSwatches>     </kuler:themeItem>   </item> </channel> 

I tried the following:

>>> feed = feedparser.parse(url) >>> feed.channel.title u'kuler highest rated themes' >>> feed.entries[0].title u'Foobar' >>> feed.entries[0].kuler_themeid u'123456' >>> feed.entries[0].kuler_swatch u'' 

feed.entries[0].kuler_swatchhexcolor returns only last kuler:swatchHexColor. Is there any way to retrieve all elements with feedparser?

I have already worked around the issue by using minidom, but I would like to use Universal Feed Parser if possible (due to very simple API). Can it be extended? I haven’t found anything about that in the documentation, so if someone has more experience with the library, please, advise me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:54:02+00:00Added an answer on May 10, 2026 at 7:54 pm

    Universal Feed Parser is really nice for most feeds, but for extended feeds, you might wanna try something called BeautifulSoup. It’s an XML/HTML/XHTML parsing library which is originally designed for screenscraping; turns out it’s also brilliant for this sort of thing. The documentation is pretty good, and it’s got a self-explanatory API, so if you’re thinking of using anything else, that’s what I’d recommend.

    I’d probably use it like this:

    >>> import BeautifulSoup >>> import urllib2  # Fetch HTML data from url >>> connection = urllib2.urlopen('http://kuler.adobe.com/path/to/rss.xml') >>> html_data = connection.read() >>> connection.close()  # Create and search the soup >>> soup = BeautifulSoup.BeautifulSoup(html_data) >>> themes = soup.findAll('kuler:themeitem') # Note: all lower-case element names  # Get the ID of the first theme >>> themes[0].find('kuler:themeid').contents[0] u'123456'  # Get an ordered list of the hex colors for the first theme >>> themeswatches = themes[0].find('kuler:themeswatches') >>> colors = [color.contents[0] for color in ... themeswatches.findAll('kuler:swatchhexcolor')] >>> colors [u'FFFFFF', u'000000'] 

    So you can probably get the idea that this is a very cool library. It wouldn’t be too good if you were parsing any old RSS feed, but because the data is from Adobe Kuler, you can be pretty sure that it’s not going to vary enough to break your app (i.e. it’s a trusted enough source).

    Even worse is trying to parse Adobe’s goddamn .ASE format. I tried writing a parser for it and it got really horrible, really quickly. Ug. So, yeah, the RSS feeds are probably the easiest way of interfacing with Kuler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to read whole lines from a socket in Erlang, or
Is there any way to read a file using sharpsvn................
Is there any way to read a TIFF file using AIR ? Looks like
Is there any way to read the asp.net Import directives at runtime? I have
Is there any way to read a file line by line in javascript, specifically
In the Mercurial API, is there any way to read the configuration values associated
Is there any way in mongoid to find and 'read' all documents in a
Is there any easy way to query a heterogeneous collection, where the objects in
Is there any way in Notepad++ (or even with another tool) to change the
Is there any way I can set a formatter on models that will convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.