Reading and writing null vs. empty XML values

When reading XML without a DTD, is it possible to get xmlStringToXMLNode … xmlNodeToDocument to distinguish between the following elements?

My understanding is that “alpha” should give me a non-null zero-length string, and “bravo” should be null, but I’m getting a zero-length string for both elements.

Likewise, when writing XML using documentToXMLString, both empty strings and nulls are being written out the same, as “”. Again, can this be changed to distinguish the 2 different values?