BookmarkSubscribeRSS Feed
Lex_SAS
SAS Employee
I have a simple XML file:

[pre]



Nathaniel Mayer
Village of Love


Noland Strong and the Diablos
Mind over Matter


Andre Williams
Jail Beat


[/pre]

I have created a simple XML map with the SAS XML Mapper 9.2:

[pre]















/singles/single

/singles/single/@id
numeric
integer



/singles/@label
character
string
7



/singles/single/artist
character
string
29



/singles/single/title
character
string
16





[/pre]

This will give a simple table:

[pre]
id label artist title

1 Fortune Nathaniel Mayer Village of Love
2 Fortune Noland Strong and the Diablos Mind over Matter
3 Fortune Andre Williams Jail Beat
[/pre]
It has the following warning message:

Column (label) in table (singles) has an XPath outside the scope of the table path. The contents of this column may not correspond to other row values and/or may be missing entirely

Why do I get this warning message ??
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
I saved your files as fortune.xml and fortune1.map and when I ran the code below, I did not get the same message. You might want to open a track with Tech Support on this. (Code in log below. My output was the same as yours.)

cynthia
[pre]
213 libname for1 xml 'c:\temp\fortune.xml' xmlmap='c:\temp\fortune1.map';
NOTE: Libref FOR1 was successfully assigned as follows:
Engine: XML
Physical Name: c:\temp\fortune.xml
214
215 proc contents data=for1._all_;
216 run;

NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.06 seconds
cpu time 0.00 seconds


217
218 proc print data=for1.singles label;
219 run;

NOTE: There were 3 observations read from the data set FOR1.SINGLES.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.06 seconds
cpu time 0.00 seconds


220
221
222 libname for1 clear;
NOTE: Libref FOR1 has been deassigned.


[/pre]
Lex_SAS
SAS Employee
Cynthia,

Sorry for the confusion, but the warning is in the XML Map, not when using the Map in SAS. It is the XML Mapper application that shows the error.

Thanks, Lex
Cynthia_sas
SAS Super FREQ
Honestly, I don't usually worry about those warnings unless the MAP doesn't work to read the data at all. For issues with XML Mapper, you might want to work with Tech Support.

cynthia
Lex_SAS
SAS Employee
Thanks, I might follow-up with Tech Support.

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