Is firstname truly an XML data field, or is it a field inside of an InfoPath form? If it's in an InfoPath form, there will be a process-level XML field containing the entire XML document of the form. You'll have to use XPath to locate the particular firstname field inside of the document. There are several code examples in the forums of how to access XML field values.
Another thought. Although you can write the code you are describing in the destination rule, you might want to write it server event. Right-click, properties, view code, event item.
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.