E
Eder Quiñones
First of all, sorry for my English.
Hello, I've been working on a new MSNP (Version 13) client for Ruby, the
only problem that I Have is that this version of the protocol has lots
of SOAP Requests and I've been trying the smart way of parsing it.
So, what i receive from the server is:
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<ServiceHeader
xmlns="http://www.msn.com/webservices/AddressBook">
<Version
xmlns="http://www.msn.com/webservices/AddressBook">11.02.1331.0000</Version>
</ServiceHeader>
</soap:Header>
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<FindMembershipResponse
xmlns="http://www.msn.com/webservices/AddressBook">
<FindMembershipResult
xmlns="http://www.msn.com/webservices/AddressBook">
<Services
xmlns="http://www.msn.com/webservices/AddressBook">
<Service
xmlns="http://www.msn.com/webservices/AddressBook">
<Memberships
xmlns="http://www.msn.com/webservices/AddressBook">
<Membership
xmlns="http://www.msn.com/webservices/AddressBook">
<MemberRole
xmlns="http://www.msn.com/webservices/AddressBook">Allow</MemberRole>
<Members
xmlns="http://www.msn.com/webservices/AddressBook">
<Member
xmlns="http://www.msn.com/webservices/AddressBook"
xsi:type="PassportMember"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<MembershipId
xmlns="http://www.msn.com/webservices/AddressBook">2</MembershipId>
<Type
xmlns="http://www.msn.com/webservices/AddressBook">Passport</Type>
<State
xmlns="http://www.msn.com/webservices/AddressBook">Accepted</State>
<Deleted
xmlns="http://www.msn.com/webservices/AddressBook">false</Deleted>
<LastChanged
xmlns="http://www.msn.com/webservices/AddressBook">2005-08-05T17:34:12.7870000-07:00</LastChanged>
<Changes
xmlns="http://www.msn.com/webservices/AddressBook"/>
<PassportName
xmlns="http://www.msn.com/webservices/AddressBook">[email protected]</PassportName>
<IsPassportNameHidden
xmlns="http://www.msn.com/webservices/AddressBook">false</IsPassportNameHidden>
<PassportId
xmlns="http://www.msn.com/webservices/AddressBook">0</PassportId>
<CID
xmlns="http://www.msn.com/webservices/AddressBook">0</CID>
<PassportChanges
xmlns="http://www.msn.com/webservices/AddressBook"/>
</Member>
</Members>
</Membership>
What I need to retrieve is everything inside the
<membership></membership> tags, for example (following the xml above):
* in MemberRole, I need what it's of the tag -> Allow
* in Member, I need the value of the attribute xsi:type ->
PassportMember
* in everything else, I need what it's inside of the next tags
-> 2
-> Passport
-> Accepted
-> False
...
until </Membership>
* Note: everything that I receive from the server it's not splited by
end-lines.
Any help of parsing this?
Thanks in advance.
Hello, I've been working on a new MSNP (Version 13) client for Ruby, the
only problem that I Have is that this version of the protocol has lots
of SOAP Requests and I've been trying the smart way of parsing it.
So, what i receive from the server is:
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<ServiceHeader
xmlns="http://www.msn.com/webservices/AddressBook">
<Version
xmlns="http://www.msn.com/webservices/AddressBook">11.02.1331.0000</Version>
</ServiceHeader>
</soap:Header>
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<FindMembershipResponse
xmlns="http://www.msn.com/webservices/AddressBook">
<FindMembershipResult
xmlns="http://www.msn.com/webservices/AddressBook">
<Services
xmlns="http://www.msn.com/webservices/AddressBook">
<Service
xmlns="http://www.msn.com/webservices/AddressBook">
<Memberships
xmlns="http://www.msn.com/webservices/AddressBook">
<Membership
xmlns="http://www.msn.com/webservices/AddressBook">
<MemberRole
xmlns="http://www.msn.com/webservices/AddressBook">Allow</MemberRole>
<Members
xmlns="http://www.msn.com/webservices/AddressBook">
<Member
xmlns="http://www.msn.com/webservices/AddressBook"
xsi:type="PassportMember"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<MembershipId
xmlns="http://www.msn.com/webservices/AddressBook">2</MembershipId>
<Type
xmlns="http://www.msn.com/webservices/AddressBook">Passport</Type>
<State
xmlns="http://www.msn.com/webservices/AddressBook">Accepted</State>
<Deleted
xmlns="http://www.msn.com/webservices/AddressBook">false</Deleted>
<LastChanged
xmlns="http://www.msn.com/webservices/AddressBook">2005-08-05T17:34:12.7870000-07:00</LastChanged>
<Changes
xmlns="http://www.msn.com/webservices/AddressBook"/>
<PassportName
xmlns="http://www.msn.com/webservices/AddressBook">[email protected]</PassportName>
<IsPassportNameHidden
xmlns="http://www.msn.com/webservices/AddressBook">false</IsPassportNameHidden>
<PassportId
xmlns="http://www.msn.com/webservices/AddressBook">0</PassportId>
<CID
xmlns="http://www.msn.com/webservices/AddressBook">0</CID>
<PassportChanges
xmlns="http://www.msn.com/webservices/AddressBook"/>
</Member>
</Members>
</Membership>
What I need to retrieve is everything inside the
<membership></membership> tags, for example (following the xml above):
* in MemberRole, I need what it's of the tag -> Allow
* in Member, I need the value of the attribute xsi:type ->
PassportMember
* in everything else, I need what it's inside of the next tags
-> 2
-> Passport
-> Accepted
-> False
...
until </Membership>
* Note: everything that I receive from the server it's not splited by
end-lines.
Any help of parsing this?
Thanks in advance.