DATA Step, Macro, Functions and more

error while reading xml file

Regular Contributor
Posts: 214

error while reading xml file

I get the below error message when reading xml file.

Is it something i am missing


ERROR: Some code points did not transcode.
occurred at or near line 69, column 311
ERROR: XML parsing error. Please verify that the XML content is well-formed.


Please help


filename SXLELIB 'C:\CTgovAE.xml';
filename SXLEMAP 'C:\';
libname SXLELIB xmlv2 xmlmap=SXLEMAP access=READONLY;

data add;
set SXLELIB.primary_outcome;

Super User
Super User
Posts: 9,789

Re: error while reading xml file

I would imagine - though can only guess as I have no information to work with - that at line 69, column 311, there is a character that does not fit into the character set you are using, or that your XML is not a proper XML file.  The former would be my guess, look at the file in textpad or using a hex editor, you will likely find a strange symbol there.

Super User
Posts: 10,520

Re: error while reading xml file

Probable cause: your SAS is not configured for UTF support, but the XML contains UTF characters.

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation