BookmarkSubscribeRSS Feed
e044800
Obsidian | Level 7

Hi,

 

I am facing tough time in reading an XML file as i have never done it before in SAS.

Can anyone help me in reading a sample XML file attached(the file extention has been changed as doc as i was not able to upload the xml file)

Can we read it using any XML engine available in Libname statement (if any)

It would also be good if any effective helpful learning material referance could also be provided.

 

Thanks

Lokesh

4 REPLIES 4
FriedEgg
SAS Employee
filename xx temp;
libname acrp xmlv2 "C:\temp\acrp.xml" automap=replace xmlmap=xx;

Using the free Xml Mapper tool from SAS instead of the automap will probably suit you better

 

https://support.sas.com/downloads/package.htm?pid=1278

e044800
Obsidian | Level 7

HI,

 

Thanks for your reply and help.

 

I did try the same code to read the XML files but its creating blank files and no observation is coming into it.

 

Not able yo resolve.

 

Kindly help.

 

Thanks

e044800
Obsidian | Level 7

Hi

 

I used the xml mapper tool as well instead of automap but the results are same.

 

What else i may try.

 

Thanks

Patrick
Opal | Level 21

The code @FriedEgg posted works for me with the file you've provided (once I've renamed it to the name FriedEgg uses).

Capture.PNG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 852 views
  • 0 likes
  • 3 in conversation