If it's useful, I've also written an XRDS-Simple parser in PHP that I use in my Portable Contacts test harness to do OAuth Discovery and Portable Contacts Discovery: <a href="http://code.google.com/p/xrds-simple/source/browse/code/php/XrdsSimpleParser.php">http://code.google.com/p/xrds-simple/source/browse/code/php/XrdsSimpleParser.php</a> -- it's just focused on fetching/parsing/navigating XRDS-Simple docs, but as such it does a bit more to help you than just unmarshalling the XML. Thanks, js<br>
<br>
<div class="gmail_quote">On Sat, Dec 27, 2008 at 7:19 AM, André Luís <span dir="ltr"><<a href="http://andr3.pt">andr3.pt</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Sat, Dec 27, 2008 at 12:27 AM, <<a href="mailto:chris.messina@gmail.com">chris.messina@gmail.com</a>> wrote:<br>><br>> Figured folks on these lists would be able to provide some feedback on<br>
> Will's initial go at an XRDS-Simple library in PHP:<br><br></div>Thanks for sharing this, Chris.<br>
<div class="Ih2E3d"><br>><br>> ---------- Forwarded message ----------<br>> From: Will Norris <<a href="mailto:will@willnorris.com">will@willnorris.com</a>><br>> Date: Fri, 26 Dec 2008 13:57:23 -0800<br>
> Subject: [diso-project] PHP XRDS-Simple Library<br>> To: <a href="mailto:diso-project@googlegroups.com">diso-project@googlegroups.com</a><br>><br><br><br><br></div>
<div class="Ih2E3d">> Right now I'm using the PHP DOM library for the<br>> marshalling, which is only available in PHP5. If we want to support<br>> PHP4, we'll need to write marshallers that use the DOM XML library.<br>
> If the code is cleanly abstracted, this won't actually be very<br>> difficult.<br><br></div>+1 for going at it from a php5 point of view. php4 is on its way out<br>and even though some legacy sites still use it, it shouldn't be too<br>
hard for them to hack a solution for your xml parsing... imho, it<br>shouldn't be in the scope of this library to provide php4 support. at<br>most, create a driver that uses php5 but can later be rewritten for<br>php4.<br>
<div class="Ih2E3d"><br>><br>> Right now I'd love to hear any feedback on this. There are a couple<br>> of phpUnit tests to see how the pieces fit together. Does this seem<br>> like a logical approach to this problem? Am I overlooking anything<br>
> really big?<br><br></div>Seems like a good approach to me... at least, as good as any.<br><br>Looking at the code (in a bit of a rush), it seems like you're not<br>doing any error handling. Is that on purpose? Should we try {} catch<br>
stuff ourselves when using the lib (xml malformed and such)?<br><br>Thanks for doing this Will. It will definitely make it easier for<br>anyone who wants to mess with xrds.<br><br>Cheers!<br><font color="#888888"><br>--<br>
André Luís<br><a href="http://andr3.net/" target="_blank">http://andr3.net/</a><br>_______________________________________________<br>general mailing list<br><a href="mailto:general@openid.net">general@openid.net</a><br><a href="http://openid.net/mailman/listinfo/general" target="_blank">http://openid.net/mailman/listinfo/general</a><br>
</font></blockquote></div><br>