Hi all, Have issue with XML created from SAS , will be appreciate for any help. So I create XML from SAS using standard libname engine: filename &filLibName "...temp.xml" ; LIBNAME &filLibName XML XMLTYPE=GENERIC ; data &filLibName..TEST_XML; set TEST_DATA; run; Then XML goes to validation on java side.For majority of data validation pass ok, without issue,but for some set of data issue occurs, and XML rejects with reason: An invalid XML character (Unicode: 0x1a) was found in the element content of the document. It looks like some invalid character come with SAS data and java validation tool reject XML due this character. XML should be in UNICODE format so I tried to changed libname to : LIBNAME &filLibName XML XMLTYPE=GENERIC XMLENCODING='utf8'; And this step changed XML header to: .<?xml version="1.0" encoding="utf-8" ?> Some special character occurs before first tag and it again crashed validation on java side, so I changed it in code(just hardcoding), so XML header after this looks like: <?xml version="1.0" encoding="utf-8" ?> But the problem still exists, XML message still rejects with same error. I browsed and found that java developers fixed this issue simply by replacing this char to another allowed character: http://stackoverflow.com/questions/8505816/streamexception-an-invalid-xml-character-unicode-0x1a It's also ok for me, but I should realize it on SAS and I actually can't find this character in SAS table,so queston is if there are some smart way to search and replace this symbol in SAS data? Maybe there are also some way to predict similar issues?I supposed enough should be set option XMLENCODING='utf8' to libname, but as I experienced it's not enough. I'm using SAS 9.1.3. Thanks!
... View more