When serializing the tree I want the information about lock

When serializing the tree I want the information about
locked items to be included. Is there a way to do that?

By default locked items aren’t included in XML
serialization output, and there is no any public API to disable such behaviour, but you can add the next code after
including all js files, but before tree initialization:

dhtmlXTreeObject.prototype._serializeLockItem=dhtmlXTreeObject.prototype._serializeItem;

This
will solve your problem.