Use XSD to generate a XML file in SAS

Reply
Occasional Contributor
Posts: 12

Use XSD to generate a XML file in SAS

Hello,

I am required to generate a XML file on SAS using a XSD provided . Please help me on how to do this. Some of the tag names in the

XSDs are longer than 32 characters, SAS doesn't take the full  name of those.

I tried using the XML mapper tool to generate a XML map and then used a libname statement to generate a XML file, but it gave me

the below error.

Here is the code applied

filename Clientli "c\edgeServerEnrollmentSubmission.xml";

filename SXLEMAP "c\CMS_XSD_MAP.map";

libname Clientli xmlv2 xmlmap=SXLEMAP ;

data clientli.edgeServerEnrollmentSubmission; set edgeServerEnrollmentSubmission; run;

Also I am attaching the XSD file (TestXSD_XML_CMS) for your reference.

Error Message:

   ERROR: XMLMap for output table edgeServerEnrollmentSubmission requested but that table did not exist

       in the XMLMap output section.

ERROR: Invalid sequence of commands for file CLIENTLI.edgeServerEnrollmentSubmission.DATA.

******************************************************************************

I also have an other question, are the XSDs required to generate a XML file, I have written a custom template to produce the required structure of the XML, but wondering if the XSDs are really needed otherwise the generated XML file is not valid. Please find the attached 4 XSD files(File 1-4), and suggest me how to merge those files into a single XSD file.

Any kind of help is highly appreciated.

Attachment
Attachment
Attachment
Attachment
Contributor
Posts: 61

Re: Use XSD to generate a XML file in SAS

Hi Jessy, Its been some time you posted this query, so is this issue resolved for you... I am facing a similar issue, where I have to create an XMLmap using XSD file, but not sure as to how to do that, do you have any materials(PDFs, documents ) that I can refer, to learn how to create a XML map from XSD file. If you can share some thoughts it would really help. Thanks, Moovendhan Devaraj
Ask a Question
Discussion stats
  • 1 reply
  • 999 views
  • 1 like
  • 2 in conversation