0

I want to convert Soap response in an array , My response is as follows :

<?xml version="1.0" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:ServerVersionInfo ......../>
    </s:Header>
    <s:Body>
        <m:FindItemResponse .......>
            <m:ResponseMessages>
                <m:FindItemResponseMessage ResponseClass="Success">
                    <m:ResponseCode>NoError</m:ResponseCode>
                    <m:RootFolder IncludesLastItemInRange="false" IndexedPagingOffset="2" TotalItemsInView="3">
                        <t:Items>
                            <t:Contact>
                                <t:ItemId ChangeKey=".." Id="....."/>
                                <t:ParentFolderId ChangeKey="AQAAAA==" Id="AQMkADc5Y2ViMmY5LTU0OTkALTQ1NmItODU0OS02ZDc4ZjZmNzM3MzIALgAAA71jNmenEatOn4H7Ntp3sEUBAMkdzXyQLFpDkRbRsnVGlRoAAAIBDwAAAA=="/>
                                <t:ItemClass>IPM.Contact</t:ItemClass>
                                <t:Subject>teting kk dev</t:Subject>
                                <t:Sensitivity>Normal</t:Sensitivity>
                                <t:DateTimeReceived>2013-10-04T11:05:39Z</t:DateTimeReceived>
                                .
                                .
                                .
                                .
                                <t:EmailAddresses>
                                    <t:Entry Key="EmailAddress1">[email protected]</t:Entry>
                                </t:EmailAddresses>
                                <t:Surname>dev</t:Surname>
                            </t:Contact>
                            <t:Contact>
                                .
                                .
                                .
                                .
                                .
                            </t:Contact>
                        </t:Items>
                    </m:RootFolder>
                </m:FindItemResponseMessage>
            </m:ResponseMessages>
        </m:FindItemResponse>
    </s:Body>
</s:Envelope>

I mainly want things inside this is an array so that if I want to use subject , I can access it as arr['Subject'] and returns testing kk dev.

So Please suggest me some way to do this . Thanks

4
  • stackoverflow.com/questions/11653309/… & stackoverflow.com/questions/206154/… Commented Oct 7, 2013 at 6:00
  • Thanks for your response , but I found this stackoverflow.com/questions/11390556/… and I guess I am really close but I got struck into displaying the tag value , If i print "i.tag" then is display subject but I don't know how to get subject value means "testing kk dev" Commented Oct 7, 2013 at 6:18
  • print i.tag, i.attrib Commented Oct 7, 2013 at 7:34
  • @Steve : Thanks , but what I want that will be fulfil by i.text Commented Oct 7, 2013 at 9:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.