Hello
I’m trying to send back XML in a custom Server side script.
var contents = platform.api.post( "ourDBservice/_proc/" + params.sp, event.request.payload, options);
var result = {
"DocDetail": [{
"Name": {"-esign" : "0"} ,
"Data": contents
}]
};
Outputs
<?xml version="1.0" ?><dfapi>
<DocDetail>
<Name>
<-esign>0</-esign>
</Name>
<Data>
<status_code>200</status_code>
<content>
When I need esign to be an attribute of Name
<Name esign="0">Monitoring</Name>
I’m not sure how to escape esign
so that its an attribute ?
Any ideas would be greatly appreciated.
Regards, Kieren.