BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kbohle
Fluorite | Level 6

Hello,

we have to read many (roundabout 100.000 / day) XML files into SAS format.

Does someone have any experience / performance testing done to read a mass of XML files at once?

What seems to be the best method? (Libname, Proc XSL, own text parser, ...)

The XML files are complex and hierarchical and have a size between 10 KB and 4 MB and all in all three different formats of files.

Thanks in advance.     Smiley Happy

1 ACCEPTED SOLUTION

Accepted Solutions
kbohle
Fluorite | Level 6

For all who are interested in XML computation with SAS.

I found know a solution together with the SAS support.

I was able to transform roundabout 2500 XML files in one XSLT computation into one CSV-file. I used within SAS 9.2 the PROC XSL procedure. In addition I had to change the SAS config file (JREOPTION) to increase the Memory size used for Java.

I had to transform three kinds of XML files (each 2500 files - together 7500 files)with different structure, different complexity and different sizes.

The transformation of the first type - in total 55 MB size - was transformed within 18 seconds!!!

The transformation of the second type - in total 145 MB size - was transformed within 60 seconds!!!

The transformation of the first type - in total 34 MB size - was transformed within 10 seconds!!!

Kind regards

View solution in original post

3 REPLIES 3
BillM_SAS
SAS Employee

The XML LIBNAME engine is probably the best place to start. Since you state that the XML files are complex, you will most likely need the XML Mapper. This application will create a XMLMap file to allow the XML LIBNAME engine to read the hierarchical XML files into rectangular SAS data sets.

This XSL procedure transforms a XML file to a different XML structure or another file format like text or HTML. Unless the XML is too complex for the XML Mapper, the XSL procedure will most likely not be needed.

kbohle
Fluorite | Level 6

Thanks for your experience.

Now - one step further - I tested already the libname engine and get a lot of problems.

The files are too complex and large for the libname engine - I've got a MEMSIZE problem. SAS support told me that I have to change MEMSIZE to 8GB which is currently in the used environment not possible.

PEOC XSL is working well to transform some of files into CSV format. Do you have any configuration experiences with PROC XSL?

Thanks in advance.

kbohle
Fluorite | Level 6

For all who are interested in XML computation with SAS.

I found know a solution together with the SAS support.

I was able to transform roundabout 2500 XML files in one XSLT computation into one CSV-file. I used within SAS 9.2 the PROC XSL procedure. In addition I had to change the SAS config file (JREOPTION) to increase the Memory size used for Java.

I had to transform three kinds of XML files (each 2500 files - together 7500 files)with different structure, different complexity and different sizes.

The transformation of the first type - in total 55 MB size - was transformed within 18 seconds!!!

The transformation of the second type - in total 145 MB size - was transformed within 60 seconds!!!

The transformation of the first type - in total 34 MB size - was transformed within 10 seconds!!!

Kind regards

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1285 views
  • 3 likes
  • 2 in conversation