07-09-2014 05:43 AM
I am trying to generate an XML file from one dataset.
No tree structure required.
I am using the below code:
libname stmt xmlv2 "&PATH.\&OUTPUT..xml";
I am able to generate the output xml file
Now problem is, for all numeric blank values in the table , I get sml tags like below:
But for text fields where value is missing it looks something like :
<OpenValueCharacter_3 missing=" " />
<OpenValueCharacter_4 missing=" " />
Marked in red, missing=" " should not be appearing in the output file.
How can i avoid this?
Thanks in advance!
07-09-2014 05:53 AM
Not used this myself, but a couple of thoughts. Could it be the options missing=''; statement is changing the numeric version to be a space on the output? Try without that. You could also replace null strings with and actual space, that should then appear as text between tags. Alternatively you could put a special symbol in, e.g if text="" then text='""';
07-09-2014 06:26 AM
Thanks for the quick reply.
I used option missing, just to avoid missing = in output file.
Also, there are like 40 columns, I cannot manually put blank or any special symbol for all the columns and it may be against the actual requirements, I mean it may not be accepted by other end system where I am going to load the file..