<name>.John Smith</name>You can do exactly that, exactly as you've shown it:
and I want it to print as:
.John Smith
where "." = a space.
<nameJohn Smith</name>
But...
I need to do this because the software I am using requires theNow you aren't talking about XML -- you're talking about the behavior of
following code for a multi-select drop down list.
the tool you're passing the XML to.
Assuming it's a browser, that's your problem; browsers are designed to
reformat text, and consider spaces in text to be only hints. You can try
replacing the space with a Required Blank character:
<name> John Smith</name>
Required Blank displays as a space but is not subject to the browser's
reformatting.
If the tool isn't a browser, you need to understand that tool's rules
for when spaces are and aren't preserved.
If you need additional help, it would be really useful to know exactly
what you're feeding this document to.