Skip to content

Instantly share code, notes, and snippets.

@vti

vti/document.t Secret

Created July 20, 2010 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vti/3cab342686453fbc39d1 to your computer and use it in GitHub Desktop.
Save vti/3cab342686453fbc39d1 to your computer and use it in GitHub Desktop.
$d = Protocol::Yadis::Document->parse(<<'');
<?xml version="1.0" encoding="UTF-8"?>
<XRDS xmlns="xri://$xrds">
<XRD xmlns="xri://$xrd*($v*2.0)">
<Service>
<Type> http://lid.netmesh.org/sso/2.0 </Type>
</Service>
<Service>
<Type> http://lid.netmesh.org/sso/1.0 </Type>
</Service>
</XRD>
</XRDS>
is($d->services->[0]->Type->[0]->content, 'http://lid.netmesh.org/sso/2.0');
is($d->services->[1]->Type->[0]->content, 'http://lid.netmesh.org/sso/1.0');
$d = Protocol::Yadis::Document->parse(<<'');
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
<XRD>
<Service>
<Type> http://lid.netmesh.org/sso/2.0 </Type>
</Service>
<Service>
<Type> http://lid.netmesh.org/sso/1.0 </Type>
</Service>
</XRD>
</xrds:XRDS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment