Hi All,
I am using SAS xml mapper to import an xml file
After running the code obtained by the XML mapper in SAS EG, I have several SAS tables
After making my changes, I'd like to export back all these tables as the unique XML they're coming from, maintaining the same hierarchical structure of the original xml file
This is an example:
Original xml (just a part of it):
<Country>
<ID>AA597FD</ID>
<Name>A</Name>
<ShortName>A</ShortName>
<Private>no</Private>
<System>
<ID>8b8</ID>
<Name>a7</Name>
<CountryID>AA597FD</CountryID>
<CurrencyOutput>euro</CurrencyOutput>
<CurrencyParam>euro</CurrencyParam>
<ExchangeRateEuro>1</ExchangeRateEuro>
<HeadDefInc>ils</HeadDefInc>
<Private>no</Private>
<Order>2</Order>
<Year>2007</Year>
<Policy>
<ID>cc</ID>
<SystemID>8b8</SystemID>
<Name>Cat</Name>
<Type>def</Type>
<Comment><![CDATA[DEF: COTS]]></Comment>
<PrivateComment />
<Order>3</Order>
<Switch>on</Switch>
<Private />
<Function>
<ID>d79</ID>
<PolicyID>3cc</PolicyID>
<Name>Defst</Name>
<Comment><![CDATA[Min and Max Base]]></Comment>
<PrivateComment />
<Order>3</Order>
<Switch>on</Switch>
<Parameter>
...
</Parameter>
<Parameter>
...
</Parameter>
<Parameter>
...
</Parameter>
<Parameter>
...
</Parameter>
</Function>
<Function>
...
</Function>
</Policy>
</System>
</Country>
From the xml mapper I obtain four tables corresponding to Function, Policy, System and Country
I tried to merge them, but the resulting xml after exporting is not the same and if I use the map is giving me errors like:
ERROR: XMLMap for output table COUNTRY requested but that table did not exist in the XMLMap output section.
Or:
Any idea on how to do it?
Thanks
Thanks for your answer
I had a look, but I don't think this can solve my problem
I can perfectly import the xml in SAS, but divided in multiple SAS tables
My problem is that I cannot export back all these tables as an XML file keeping the hierarchical structure
Use xml mapper to map the xml to a single table that contains all the information you need.
In that map add the <OUTPUT> tags and tableref that single table.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.