SAS v9.22, WinXP, XML Mapper
I've manually created map file from a complex schema and am using the XML92 engine to read in the XML data files. I have successfully tested this method on 3 XML files, 1 of which is close to 450MB in size. Recently, I received a new sample file (only 14Mb) and now it's failing (well, it's failing in the sense that no data observations are being read by SAS).
Code:
libname incoming xml92 "&xml_file"
xmlmap="&xml_map"
xmlschema="&xml_schema"
xmltype=xmlmap
xmlmeta=schemadata;
proc print data=incoming.x_headerinfo; run;
...where the x_headerinfo is the first node of data in the file.
Log:
NOTE: Processing XMLMap version 1.9.
NOTE: Libref INCOMING was successfully assigned as follows:
Engine: XML92
Physical Name: W:\Data_Management\test.xml
2111 proc print data=incoming.x_headerinfo; run;
NOTE: Access by observation number not available. Observation numbers will be counted by PROC PRINT.
NOTE: No observations in data set INCOMING.x_headerinfo.
NOTE: There were 0 observations read from the data set INCOMING.x_headerinfo.
Interestingly, within XML Mapper, I can use the Table View tab to see the data, correctly mapped. But Base SAS is unable to replicate this. Even SAS Explorer is unable to open any 'tables' to view.
I've added an End Path for the table, which is the same as the Path, set as End. And added an automatic enumerator ot the table. No luck on the Base SAS side but I see correct mapping in the Table View of XML Mapper.
I've been researching this problem for the past 2 weeks and have read several really good papers on the subject, but haven't found reference to this problem.
3 Questions:
1) What are the reasons why Base SAS is unable to achieve access by observation number in an XML file? (something to do with Sequential Reading of the file instead of Random reading?)
2) Any references to suggest?
3) Any suggestions for the above problem?
I'm considering having the sender re-create their XML file. the only thing I can find in their file that might be problematic is that the order of nodes is not the same as one of the other test files that does work.
... View more