Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!

How to read xml data using domelement


Level 1

I have created SOAP service in Adobe campaign and passing XML data. In the schema I have created a method and have defined the param type as DOMElement. When I pass the xml data to the SOAP API I am not able to read/parse the xml data in js.

2 Replies


Community Advisor

Hi @samirghogale 

it could be that you are passing a string and not a DOM object.

In that case try this in JS var input = DOMDocument.fromXMLString(data);





Level 1

I have defined the column xmlPayload as DOMElement in the schema testschema as below.


<method library="tst:javaScript.js" name="methodname" static="true">
<param desc="schemaname" inout="in" name="xmlPayload" type="DOMElement"/>
<param desc="Return" inout="out" name="response" type="DOMElement"/>


In the tst:javaScript.js script I have defined function tst_testschema_methodname(xmlPayload)


    var column1 = xmlPayload.body.addrress;




I dont see any value in column1.


My payload is 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">


I need to see Mumbai