KB Article #46552

Create an output XML file with namespaces from an input XML file without namespaces.

Problem

Create an output XML file with namespaces from an input XML file without namespaces.


Resolution

For that first WE need to use literals.Literals provide a way through which we can map XML_IN(without namespace) to XML_OUt(with namspace).



Following are the steps:
1.) Create Literals on input side. suppose String1 and String 2
2.) Map String 1 with name/xmlAttr
3.) MapString2 with value/xmlAttr
4.) Inside the link code of string1->name/xmlAttr, we need to mention the source expression like "xmlns:<>" same as according to XSD file.
5.) In same way , mention the source expression for string2->value/xmlAttr like "urn:segments" which is according to the XSD file



Source expression must be in double quotes.



Just create literals and map it to the name/value pair of xmlAttr record.