I am writing some code that converts a Perl HASH to XML data. I didn’t know how to write Undef in XML. It seems this is the common way to write this:
- empty value: <string />
- undefined value: <string defined=”false” />
- normal value: <string>abc</string>
Because you can have empty keys perhaps “” => undef must be written like this <item key=”” defined=”false” /> ?? This rules out Undef keys but I think I can live with it.