HELP ME PLZ! nodesForXPath just not working

64 views
Skip to first unread message

mike

unread,
Mar 3, 2010, 11:37:54 AM3/3/10
to KissXML
Hi All,

I have an DDXMLNode 'message' which contains the following XML:

<event xmlns="http://jabber.org/protocol/pubsub#event">
<items node="/xxx/3eeaaab0-fb1f-4ed7-b539-cb2f42ee8f75">
<item id="1PPv7xIGBL4dS9J">
<data xmlns="http://jabber.org/protocol/pubsub">qqq</data>
</item>
</items>
</event>

Im using kissxml with xmppframework. When i use the nodesForXPath like
so to access the data node i get no results returned:

NSArray *event = [message nodesForXPath:@"//event/items/item/data"
error:&error];

the message node does have the namespace when i do [message
namespaces] registered, but i cant seem to find a way to define a
prefix if thats what i need to do?
I havent a clue what else to try. Please help.

Thanks M

mike

unread,
Mar 3, 2010, 12:08:11 PM3/3/10
to KissXML
sorted this with local-name()

Mike

Reply all
Reply to author
Forward
0 new messages