Add serialization to js2xml