Modified to use the addPropertyNode method instead of addNode method(deprecated api). #555

Please review #555 .