Reading and writing null vs. empty XML values ..2

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?

Hello,
Once you send in put as XML to the service xmlStringToXMLNode … xmlNodeToDocument, automatically document will be created as XML tags given in the input xml file.

  1. if there is starting tag and ending tag with no data (e.g : )

    • that means there if no data and if u check that length that string its ‘0’, but it is not null.
      when it shows that as null ?
      if there is no tag with the name “alpha” in the input then in the target map(if u are using vaue of ‘alfa’) u will get “null”.
  2. means similar to there is no difference in reading those two tags by xmlStringToXMLNode … xmlNodeToDocument services.

Thanks,
Ramesh

Hello,
Once you send XML data to the service xmlStringToXMLNode … xmlNodeToDocument, automatically document will be created as structure of XML tags given in the input xml file.

  1. if there is starting tag and ending tag with no data (e.g : )

    • that means there if no data and if u check that length that string its ‘0’, but it is not null.
      when it shows that as null ?
      if there is no tag with the name “alpha” in the input then, in the target map if u are using vaue of ‘alfa’ definitly u will get “null”.
  2. means similar to there is no difference in reading those two tags by xmlStringToXMLNode … xmlNodeToDocument services.

Thanks,
Ramesh

Thank you for your reply Ramesh.

When I input the following string to the xmlStringToXMLNode…xmlNodeToDocument services, both the “alpha” and “bravo” fields are created in the document with a non-null zero-length string. “bravo” is definitely not null, even though I believe it should be.

<?xml version="1.0" ?>

CCC

A null value in XML is not present at all. is an empty value according to the XML standard, not a null.