I am available for hire as a software freelancer – telecommuting, Europe, the Americas, Middle East, …
My blog is *my* blog. You have to be either rather nice for your comments to get through here - or *rather* beautiful.
If your XML has a namespace withoutprefix (xmlns="…" instead of xmlns:aaa="…", where 'aaa' would be called the prefix), you still have to provide registerNs with a proper prefix and use that prefix from then on; no undef or zero-length string allowed as prefix.
Learning this lesson cost me some sleep last night.
You can find the URL-s of the Atom and the RSS feeds for such a blog in its HTML:
/html/head/link[@rel="alternate" and @type="application/atom+xml"]/html/head/link[@rel="alternate" and @type="application/rss+xml"]
Within the XML of an Atom feed you can find a node like this:
/feed/link[@rel="next"]
/feed/link[@rel="next" and type="application/atom+xml"]
Found 1 nodes:
-- NODE --
The href attribute looks rather interesting, it uses these CGI parameters:
start-index
max-results
Actually the href used the somehow internal URL of that blog, but apparently both "public" URL and internal URL seem rather interchangeable – trial and failure "proved" that. Furthermore these CGI parameters also work on the URL of the RSS feed, not just the Atom feed.
BTW: Both feed XML-s carry an element openSearch:totalResults, find it like this:
It tells you exactly, what it says, i.e. the number of total results.
So you may very well read blog feed XML-s in small chunks, until you reach their end. I assume, this is what Google Reader does e.g. . It shows you the most recent blog articles (resp. their stubs) initially, and extends the list, when it notices, you are scrolling "beyond the end".
Yes, reading XML can be fun. Of course tidying helps (me) a lot, and emacs's nxml-mode in my case.
Of course, any pointers to relevant Blogger API documentation is kindly appreciated.
I applied this (and a little more) in order to migrate my table_pdf2csv.pl , and of course I like it much better now. From there I will easily create more nice utilities.