Fix DDXMLNode encoding.

Previous encoding appears to have been MacRoman. Switched to UTF-8. Only changes smart single/double quotes in comments, not actual code, which is all ASCII.

Needed because genstrings complains if files are in anything other than UTF.
Fixed 64-bit warnings.

At one point in the code, length message result is being used as an int value. Easiest solution (and unlikely to be an error, unless an XML doc is bigger than 2 billion characters) is to do an explicit cast to int.
Fix local variable shadowing.

Code uses two local variables named prefix, which triggers a warning when you turn on shadowing.

Doesn't cause any actual problem, since the two variables are used independently, but it's still good to fix this stuff.