While I didn’t blog about last week’s status, significant progress has been made in parsing TypePad and Movable Type AtomPub feeds (well, parsing TypePad feeds). This week started off by completing more research on the AtomPub spec. In order to parse an AtomPub feed, I had to learn about X-WSSE authentication. From there, I found a great X-WSSE class that I included in my test version of WordPress. Then, the fun began.
Movable Type Hates Me
Almost immediately, I was retrieving the RAW XML of TypePad’s AtomPub feed. Unfortunately, I could not say the same for Movable Type. Due to some server configuration issues on my end or possibly a bug in Movable Type, I am unable to retrieve Movable Type AtomPub feeds at the moment. I’ve tried various methods of parsing the feed and each method returns the same cryptographic error message. I’ve called in the experts (my mentor, Lloyd) to help me, but if anyone has any clue as to why Movable Type hates me, I would appreciate the feedback.
Parsing the Feed
Regardless of the error, I kept on trucking with the TypePad AtomPub feed, knowing that Movable Type will fall in line once I can figure out my retrieval problems. Working with TypePad’s feed, I started trying different methods of Atom parsing. I first tried WordPress’ built in Magpie parser, but due to Magpie not supporting Atom 1.0, that was little help. I then tried some code snippets on php.net, but unfortunately none of the snippets parsed in the manner I required. So, I started writing my own basic XML parser.
That’s where I stand today. This coming week I will continue writing my custom XML parser, completing the parser by the end of next week. The goal is to have all AtomPub data in array, so I certainly have my work cut out for me.

7 Comments
Have you tried SimplePie for ATOM parsing?
http://simplepie.org/
Yes, I’m well aware of SimplePie. However, it has been discussed in the past amongst WordPress developers that SimplePie should not be included in core. Regardless, writing a custom parser should be fairly straightforward, and will take less space than the whole SimplePie library.
Hi!
Actually, if you are using AtomPub, correct endpoint is
/mt-atom.cgi/1.0
Not
/mt-atom.cgi/weblog
So, in your case,
http://mt.cavemonkey50.com/mt/mt-atom.cgi/1.0
And “the same cryptographic error message” seems to be a bug in MT. It suppors to display an error message such as invalid login.
Toru, if that is the correct endpoint, then Movable Type is advertising the wrong URI in the RSD. Regardless, I’ll try the URI you suggested and see if it makes any difference.
There was no difference in using that URI. Have you been successful in using MT’s Atom API?
I haven’t tested MT since I did the last time.
http://www.witha.jp/eXeries/2008/02/17/movable-type-41-and-atompub/
MT4.1 supports (kind of..) 2 kinds of AtomAPI. One was the old pre-draft version of AtomAPI, and another was the IETF’s AtomPub. That’s why MT4.1 had 2 endpoints. It took me a while to figure this out.
Anyway, the SixApart dev team told me that they’re gonna overhaul the code for the API like I posted to the blog.
Well, Toru, unfortunately the different endpoint made no difference. I’m still not able to pass authentication, even using the special API password. Do you know if MT is doing anything special outside of the traditional WSSE base64-encoded SHA1 hash password?
One Trackback/Pingback
[...] started the week off by writing the custom XML parser I talked about last week. To do this, I researched several different methods for utilizing PHP’s xml_parse function. [...]
Post a Comment