added code to allow only valid XML node names. off by default as it will
kill file names as element names.