07-11-2017 12:34 PM
Is there a way to convert boolean values of "true" and "false" to numeric 0 and 1 inside an XML Map? Can I apply a custom format to the XML Map?
A data provider recently switched the format that they send thier data to us to XML. I have been working with the XML to create an XML map to be able to convert the XML into the SAS datasets that we have. Previously there were a series of variables that that came with values of 0 or 1 and were formatted as numeric in the SAS datasets. The XML now is sending those variables as "true" and "false" (Example: <Master>false</Master>). I am assuming that the data provider has these stored in a database that allows for a boolean data type which is why this formatting has changed.
I know that I can do this in a data step fairly easily for a single table, but currently there are no distinct data steps being used, only a macro loop that reads in all of the tables.