Actually, that doesn't work (if you're talking about just removing the ampersand after the first equal sign). If you read the section of the article I'm referring to carefully, you'll see why.
That's the problem I usually have with references - you have to be really careful with what you are doing and I am usually more of the 'just try it' type.
In the current version of the code that Derick mentions (ezmatrixdefinition::xmlString() ) they simply unset the variable so they can reuse it reuse in the loop:
This should probably work fine in your code as well as it breaks the connection between the variable and the content so the content is still there even if you reuse the variable.