Hi I am working with the xmpp every thing working fine.But I am unable to parse below xml
<message
xmlns="jabber:client" to="919452544@server" id="859e7-870" type="chat" from="917696997127@server/Smack">
<body>Broadcast</body>
<properties
xmlns="http://www.jivesoftware.com/xmlns/xmpp/properties">
<property>
<name>stream</name>
<value type="string">8d879bea44f792468d6ecad161d3e545</value>
</property>
<property>
<name>date</name>
<value type="string">2016-05-05 10:36:25</value>
</property>
<property>
<name>broadcast</name>
<value type="string">Broadcast</value>
</property>
</properties>
</message>
in the above xml first i need to check that body is equal to Broadcast.
Then i need to parse <name>stream</name><value type="string">8d879bea44f792468d6ecad161d3e545</value>
How to get the name and value in above xml.
I tried like this but every time condition is success.below is my code
if ([message elementsForName:@"name"] ) {
NSArray *nameArray=[message elementsForName:@"name"];
NSLog(@"name Broadcast %@",nameArray);
}
but nameArray always empty.please help me out