Quantcast
Viewing all articles
Browse latest Browse all 3576

Re: XML needs starting tag and ending tag without value through PI

Hi Naveen,

                     See this mapping where all items are mapped one to one except item3 which is linked to target field mapwithdefault

 

Image may be NSFW.
Clik here to view.
mapStructure.JPG

 

Now in test tab I am testing a payload

 

Source payload

 

<?xml version="1.0" encoding="UTF-8"?><ns0:MT_SRC xmlns:ns0="urn:Demo/SCN">   <Header>      <Item1>1</Item1>      <Item2/>      <Item4>3</Item4>   </Header></ns0:MT_SRC>

In the payload item3 is not present while Item2 is present but there is no field value. After mapping the xml generated is

 

<?xml version="1.0" encoding="UTF-8"?><ns0:MT_TGT xmlns:ns0="urn:Demo/SCN"><Header><Item1>1</Item1><Item2></Item2><Item3></Item3><Item4>3</Item4></Header></ns0:MT_TGT>

You can see Item3 with empty tag is present in output because you had an empty context inserted via "mapwithdefault".

 

 

Regards

Anupam


Viewing all articles
Browse latest Browse all 3576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>