[Xml-compile] Null characters in strings

Patrick Powell papowell at astart.com
Tue Dec 10 17:17:37 GMT 2013


I ran into a very odd problem today.  Due to a cut and paste update of a 
database field,  a Null (0x00) value was put into a string. This was 
then used as part of a message by the XML::Compile SOAP client.

I ran into some funny problems.   First,  one toolset generated a � 
for the null.  However,  this resulted
in an error when sent to an XML::SOAP server.  - illegal XMLchar value 0 
(I do not have the exact error message).

I then used an XML::Compile based client and looked at the SOAP message 
that was being sent.  It did not appear to have the null value in the 
string.

Question:  Does XML::Compile or its support libraries/facilties delete 
NULL characters before
doing string encoding (i.e. - translates & to &)?   Does it do this 
for other characters?

Question:  Is there a magic option/flag for XML::Compile so that it will 
ACCEPT strings with encoded
null characters in them?

Question:   If there is no way to do this,  is there 'preprocess the 
incoming message' option so that
in desperation cases the encoded NULL characters can be removed?



More information about the Xml-compile mailing list