BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'll receive a large daily XML file which I want to read in using the XML engine. It seems to read it fine with XMLMapper and successfully displays the Table View of the XML. However when I use the map it generates with the xml libname, it doesn't fail but the table contains no records. The higher level structure of the document is below. The libname engine appears to have difficulty with any elements containing ":" The envolope and body elements refer to SOAP wrappers but the ns3: element is custom.

Any idea why the map successfully used to view a table in XML Mapper does not work when using the libname engine?









2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
This really isn't a question for the SAS Macro forum. the XML tagsets used with ODS fall under the ODS forum topics. When you're dealing with XML Mapper and the SAS XML Libname engine, you might want to work with Tech Support -- as the capabilities of both the XML Mapper and the SAS XML Libname engine are version specific. That means the 9.1.3 map and the 9.1.3 engine might have different capabilities than the 9.2 map and the 9.2 SAS XML Libname engine.

You can open a track with Tech Support and they can look at ALL your code and your XML file and help you figure out what's going on.

Generally, in XML when you have a namespace as defined in the XML (such as this namespace declaration from TAGSETS.EXCELXP):
[pre]
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
[/pre]

then you can USE the namespace like this in the XML tags in the XML document
[pre]
<Row ss:AutoFitHeight="1" ss:Height="15">
[/pre]

which uses the AutoFitHeigh and Height attributes from the SS: namespace -- another way of making clear that these attributes are conforming to the specification for xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" and are probably NOT going to be found in any of the other namespaces listed on the Workbook tag -- in my example.

When you use the XMLMapper, you are building XPATH descriptions of the navigation path that needs to be traversed in the XML in order to turn the XML information into a SAS dataset. Tech Support needs to look at your LOG to see any warning messages that were issued. And, they need to look at your XML and your XML Map code to see whether the correct XPATH was generated when you were using the XML Mapper to build your map.

But, what I don't know and what you also might want to check with Tech Support is whether there's something different you have to do in order to read SOAP XML. For example, there is PROC SOAP, which is designed to read SOAP XML:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en...

To open a track with Tech Support, fill out the form at this link:
http://support.sas.com/ctx/supportform/createForm

cynthia
deleted_user
Not applicable
OK will do, thanks

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
  • 2 replies
  • 1160 views
  • 0 likes
  • 2 in conversation