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

SAS XML mapper data validation rule.

Is there any way to add data validation in XML file? I have created numeric column in xml file which is calling from stored process(web service) and if I provide character value as input parameter while calling  it does not through error as wrong data.
XML 
<name column="name">
<path ......</path>
<TYPE>numeric</TYPE>
<DATATYPE>double</DATATYPE>
Where and how can I put validation here?

1 ACCEPTED SOLUTION

Accepted Solutions
jakarman
Barite | Level 11

An XML file is just character. That numeric indication has very limited meaning. It is for the XML Parser what to do with that. When that is just a serial string parser (web) nothing is garanteed.
The XSD https://en.wikipedia.org/wiki/XML_Schema_(W3C) is the one that could be used as the metadata and validation. Nothing being sure as only a recommendation.     

 

---->-- ja karman --<-----

View solution in original post

2 REPLIES 2
jakarman
Barite | Level 11

An XML file is just character. That numeric indication has very limited meaning. It is for the XML Parser what to do with that. When that is just a serial string parser (web) nothing is garanteed.
The XSD https://en.wikipedia.org/wiki/XML_Schema_(W3C) is the one that could be used as the metadata and validation. Nothing being sure as only a recommendation.     

 

---->-- ja karman --<-----
Bal
Calcite | Level 5 Bal
Calcite | Level 5
Thank you for your quick reply.
I defined character column in XML and applied logic in STP code.

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