BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there a way to use SAS to run XQuery to query data collections of XML data? I know this can be done using SQL Server, against an xml data field. I'm looking to do the same using SAS. Does anyone know, or can anyone point me to some resource where I can find out more about this? I've tried googling but haven't found anything useful. Thanks in advance for the help.
4 REPLIES 4
RussAlbright
SAS Employee
I don't think SAS provides direct XQuery support to XML, but SAS does have XML support for data sets. Have you looked into the XML Libname Engine together with the SAS XML Mapper? Maybe you can map the xml fields to SAS variables with these tools, and then convert your XQuery to PROC SQL and query the table that you create?

Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

deleted_user
Not applicable
Thanks RussA@sas. I want to avoid the step of mapping xml fields to SAS variables, for various operational reasons.

So you're saying SAS cannot directly XQuery xml fields in a SQL Server database. How about using XPath?
ren_s
Fluorite | Level 6

Hi deleted_user,

 

Many years later, I am facing the same issue with SAS9.3.

Did you manage to query with xquery (without mapping) after all?

 

If so, how?

 

Best regards!

Rama_V
Obsidian | Level 7

This may or may not help now, I have seen XML input node in SAS DataFlux Management Studio tool which runs Xquery to read XML files.

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 choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1606 views
  • 1 like
  • 4 in conversation