<?xml version="1.0" encoding="ISO-8859-1"?><!-- OPML generated by OPML Editor v10.1a8 on Tue, 01 May 2007 20:14:13 GMT -->
<opml version="2.0">	<head>		<title>01.opml</title>		<dateCreated>Tue, 01 May 2007 20:01:47 GMT</dateCreated>		<dateModified>Tue, 01 May 2007 20:14:13 GMT</dateModified>		<ownerName>Tom Morris</ownerName>		<ownerEmail>http://blogs.opml.org/mail/tommorris</ownerEmail>		<expansionState></expansionState>		<vertScrollState>1</vertScrollState>		<windowTop>361</windowTop>		<windowLeft>527</windowLeft>		<windowBottom>660</windowBottom>		<windowRight>1212</windowRight>		</head>	<body>		<outline text="MySpace API updated" created="Tue, 01 May 2007 20:01:46 GMT">			<outline text="I have updated the unofficial MySpace API that I built a while back. It now turns out decent quality JSON." created="Tue, 01 May 2007 20:02:00 GMT"/>			<outline text="The XML has been moved around a little bit, but so long as you aren't using some kind of insane regular expressions based parsing or something, it should all work." created="Tue, 01 May 2007 20:02:28 GMT"/>			<outline text="One other thing I've changed is that we now do not have the 'alumni' status. It wasn't working before - it just returned an empty XML element. I've removed it until I can get around to updating the screenscraper to pull it again." created="Tue, 01 May 2007 20:02:53 GMT"/>			<outline text="Reworking this has forced me to learn how to handle data methods in Python a bit better - namely, the fact that you can have lists and dictionaries within one another. Python and JSON really are a nice combination. I have a really simple PHP script to turn this kind of data in to XML, and then I can use XSLT to rejig the XML in to other formats (OPML, RSS and RDF/XML, for instance)." created="Tue, 01 May 2007 20:03:59 GMT"/>			<outline text="It's quite a neat setup I've now got going. Any language that can turn out JSON can be used to find and build the initial data structure (Perl, Python and PHP - in reverse order - are usual suspects for me). Then a simple PHP script to XMLize the data. Then PHP and/or (E)XSLT to do transforms on that data. This really separates out the process. Fixing the scraper doesn't interfere with the presentation layer (ie. the 'XSLT layer'). Needing to tweak an XSLT file doesn't break the scraper either." created="Tue, 01 May 2007 20:07:12 GMT"/>			<outline text="With judicious use of .htaccess, it makes it quite easy to provide a decent service for people." created="Tue, 01 May 2007 20:10:22 GMT"/>			<outline text="The MySpace API, then:" created="Tue, 01 May 2007 20:11:32 GMT"/>			<outline text="xml.opiumfield.com/myspace/&lt;i&gt;username&lt;/i&gt;/&lt;i&gt;format&lt;/i&gt;" created="Tue, 01 May 2007 20:11:43 GMT"/>			<outline text="username is either the 'friend ID' or the username in the URL. Format can be either 'json', 'xml', 'rss', 'opml' or 'rdf'." created="Tue, 01 May 2007 20:11:56 GMT"/>			<outline text="JSON, XML, RDF and OPML are self-explanatory. RSS is an RSS feed of comments posted on that profile." created="Tue, 01 May 2007 20:13:17 GMT"/>			<outline text="&lt;a href=&quot;http://www.haloscan.com/comments/tommorris/myspaceApiUpdated87392/&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;postCount('myspaceApiUpdated87392');&lt;/script&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.haloscan.com/tb/tommorris/myspaceApiUpdated87392/&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;postCountTB('myspaceApiUpdated87392'); &lt;/script&gt;&lt;/a&gt;"/>			</outline>		</body>	</opml>