I used a SOAP API to get the response. And now I have a long XML response. I tried to convert XML into JSON and then to read. But, it couldn't work. Then I tried xml2js , xmldom and filterxml to read the attributes. But, it didn't work.
XML Response.
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI" />
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI" />
</eb:To>
<eb:CPAId>36465</eb:CPAId>
<eb:ConversationId>4767547547745757</eb:ConversationId>
<eb:Service eb:type="sabreXML">Session</eb:Service>
<eb:Action>SessionCreateRS</eb:Action>
<eb:MessageData>
<eb:MessageId>45757457547</eb:MessageId>
<eb:Timestamp>2020-04-29T12:13:28</eb:Timestamp>
<eb:RefToMessageId>63465653634ffghfghfghf</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">bmkfdkdgkdskmlskfsdfpskmfl</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<SessionCreateRS xmlns="http://www.opentravel.org/OTA/2002/11" version="1" status="Approved">
<ConversationId>4767547547745757</ConversationId>
</SessionCreateRS>
</soap-env:Body>
</soap-env:Envelope>
**Update
As I told I tried to convert XML into JSON using xml2jsn. And it gave me the complete json response. But, I can't go for a attribute that I want because of these symbols, -(dash) and :(colon).
I just want to get " wsse:BinarySecurityToken " value. Then how can go for the wsse:BinarySecurityToken ??
var parseString = parseStringReq.parseString;
parseString(SetSoapTokenRes, function (err, result) {
let json_res = JSON.stringify(result, null, 4);
// json_res = json_res.replace(':', '_') //output: 'A D C'
res.end(json_res.soap-env:Envelope);
});