Soorej Babu
Soorej Babu

Reputation: 368

How to convert string to xml in iOS? (objective C, xcode 7.2)

I want to convert a NSString variable containing xml codes into xml format. My xml request is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
        <Authentication xmlns="(namespace link)">
            <Credentials>
                    <Username>username</Username>
                    <Password>password</Password>
            </Credentials>
        </Authentication>
</soapenv:Body>
</soapenv:Envelope>

then i saved this request to a NSString variable. And i got response for this as the server didn't recognize as xml. So how to convert the string i saved into xml?

Upvotes: 1

Views: 1024

Answers (1)

Related Questions