Problems reading in an XML file into SAS with the XML Mapper?

Reply
N/A
Posts: 1

Problems reading in an XML file into SAS with the XML Mapper?

Hi all,

I have been playing with an XML file (I have the XSD too), and want to read it into SAS as a dataset. The problem is that when I create the XML map for it using the SAS XML Mapper, it creates separate Datasets for each of the Tag set in the XML file and that is when I lose all the information from the file that I want. I know which particular tags I need from the large XML file, but can't seem to figure out a way to extract that information into a SAS table.

The XML file and the  XSD schema are attached here.

Here is what I have tried

filename Amadeus "E:\Dataroot\A. Source\A.08 CSV Sources\UAT.CML.WF940.HFT.D150430.DATA..xml" ;

LIBNAME Amadeus XMLV2  xmlmap="E:\Dataroot\A. Source\A.08 CSV Sources\Check_In.map"  ;

Data S_Flightdetails;

  set amadeus.Flightdetails;

run;

Data S_Checkedbaggagedetails;

  set amadeus.Checkedbaggagedetails;

run;

Data S_Seatdetails;

  set amadeus.Seatdetails;

run;

Data S_documentdetails;

  set amadeus.documentdetails;

run;

These 4 tables are the tag sets from which I need the information, but the challenge is that even though the XML file contains maybe 5 records, these tables when read into SAS have different number of rows, and there is no way to link all of them together to recreate the 5 rows that were there initially.

I have tried a lot of things with this file and nothing seems to work. I am just wondering if there is something wrong with the file.

Can anyone look into this and help me out?

Cheers

Gaurav  

Attachment
Attachment
Ask a Question
Discussion stats
  • 0 replies
  • 152 views
  • 0 likes
  • 1 in conversation