BookmarkSubscribeRSS Feed
JuliusC
Calcite | Level 5

Hi everyone,

Me and my colleagues are working with a dataset that comes in XML format. So far we have been able to extract all of the variables and their attributes to SAS using the XML Map we created, except one -- xml:lang.

xml:lang is an attribute that some of the variables in the dataset might have. For example, there is a variable called LegalName which has an attribute xml:lang. We want to extract the values of this attribute into our SAS dataset as a new variable called LegalName_lang. 

We tried implementing this with the following XPath:
/{1}LEIData/{1}LEIRecords/{1}LEIRecord/{1}Entity/{1}LegalName/@xml:lang

We also tried

/{1}LEIData/{1}LEIRecords/{1}LEIRecord/{1}Entity/{1}LegalName/@lang

None of them worked. 

Also, the manual of the dataset (http://www.leiroc.org/publications/gls/lou_20140620.pdf) has the following information about xml:lang but we're not sure how/if this would affect XPath for xml:lang. 

"All XML attributes are in the null namespace (attribute form = unqualified), with the exception of xml:lang."

The dataset itself can be found at: https://www.gleif.org/en/lei-data/gleif-concatenated-file/lei-download

I would really appreciate it if somebody knowledgable in XML could look into this! 

Many thanks,

Julius


Capture.JPG
1 REPLY 1
BrunoMueller
SAS Super FREQ

I suggest you contact SAS tech support for this.

 

Bruno

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 926 views
  • 0 likes
  • 2 in conversation