9 Nov 2010 - Digital Strategy // By Productive Edge Team

ActiveJDBC gets XML generation

While development on this project is an ongoing effort, I do not always have time to blog about new functionality. However, XML generation is something that is really useful for REST Web services. Having this built directly into the ORM layer spares additional programming, reliance on new dependency and in general promotes the light weight style of development. I also tried to ensure that the API themselves are lightweight. Here is an example:

Person p = Person.findById(1);
String xml = p.toXml(2, true);

This is simple and self - explanatory. The first parameter is a number of spaces to use for indentation, and second - whether to pre-pend the XML declaration.

Of course there is more to it than meets the eye. The LazyList also got the same method, allowing to convert a list of models into XML.

For more information, please refer to:

Happy coding!

ActiveJDBC gets XML generation