Should I use the DomHelper setProperties method instead?