You are confusing the directory interface "wrapper for ldap" with the FS Directory (The XML Registry)
How the XML Registry works is extensively documented in the wiki and our FS book.
The gist is that the XML is the abstraction layer; So you can write modules to seek things from the XML and not worry about external access.
Then you write modules that bind to xml searches and pre-empt the static xml by returning your own binary xml object with the correct data.
xml_curl and xml_scgi are the 2 in-house examples that transform the xml search into a url and fetch the xml from a remote service but you can also easily make a binding module to parse xml searches, do sql stmts and format the results in a binary xml obj without ever using textual xml markup.