Custom Atom elements without breaking compatibility?

Discussion in 'Web Design and Development' started by Nutter, Mar 10, 2008.

  1. Nutter macrumors 6502

    Joined:
    Mar 31, 2005
    Location:
    London, England
    #1
    Is it possible to add custom metadata to an Atom feed, without breaking compatibility with feed readers?

    I've added a custom namespace and custom elements to my feed, but Safari now refuses to read the feed, stating that “The feed could not be loaded because the content is not in a known feed format”.

    I need this metadata in a custom application that loads the feed, but I want other feed readers to simply ignore these extra elements. Is that possible?

    Excuse my ignorance, I'm a Cocoa developer and I know very little about this new-fangled interweb stuff...


    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:b="http://www.example.com/">
    
      <title>Example</title>
      <link href="http://www.example.com/"/>
      <updated>2008-03-09T18:30:02Z</updated>
      <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
    
      <entry>
        <title>Front door</title>
        <link rel="enclosure" type="video/quicktime" length="12345" href="http://www.example.com/"/>
        <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
        <updated>2008-03-09T18:30:02Z</updated>
        <b:cameraNum>0</b:cameraNum>
        <b:codec>MPG4</codec>
        <b:width>640</b:width>
        <b:height>480</b:height>
      </entry>
      
      <entry>
        <title>Street 1</title>
        <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
        <updated>2008-03-08T20:31:56Z</updated>
        <b:cameraNum>1</b:cameraNum>
      </entry>
    
    </feed>
    
     
  2. Nutter thread starter macrumors 6502

    Joined:
    Mar 31, 2005
    Location:
    London, England
    #2
    Ah, foolish me!

    If I make sure that my tags match, then it works!
     

Share This Page