LDAPXML is a set of java classes that allow you to access LDAP entries as custom defined XML. It allows you to map the various LDAP objectClasses and attributes to XML namespaces, attributes, elements etc. If you're looking for something that just pulls LDAP data into XML format without mapping it to a custom schema, then DSML is what you're looking for.
LDAPXML uses map files written in XML to map the data. Here's the map file documentation, as well as a sample.
Java API Docs
LX Map File Documentation
Custom Conversion hooks
// connection: A connected LDAP connection // doc: An XML document // test.map: A LX map LXMap map = LXMap.loadMap("file:///test/test.map"); LXReader reader = new LXReader(); reader.setConnection(connection); reader.setMap(map); Element el = reader.retrieveEntry(doc, "cn=test,dc=test,dc=com"); // el now contains a mapped entry
LXResults res = reader.retrieveSearch(doc, "dc=test,dc=com", "(objectClass=person)"); // ... either enumerate the results ... for(int i = 0; i < res.getLength(); i++) el = res.getResult(i); // ... or just use them all together ... doc = res.assembleDocument();
Binary JAR: ldapxml-0.9.4.jar
Full Sources: ldapxml-0.9.4-src.jar
Binary JAR: ldapxml-0.9.3.jar
Full Sources: ldapxml-0.9.3-src.jar
Binary JAR: ldapxml-0.9.2.jar
Full Sources: ldapxml-0.9.2-src.jar
Binary JAR: ldapxml-0.9.1.jar [broken]
Full Sources: ldapxml-0.9.1-src.jar [broken]
Binary JAR: ldapxml-0.9.jar
Full Sources: ldapxml-0.9-src.jar
Open Source: BSD type license. Contact me when bugs are found.