[jdev] function implemented ???
Remy HAREL
remy.harel at GICM.FR
Wed Jun 2 08:02:52 CDT 2004
hi all ( Bonjour ;) ),
I'm working on c2s module, the c2s.c file most of time. By using
NAD_AVAL I've got this :
Wed Jun 2 14:53:32 2004 [notice] Valeur de NAD ANAME 1:
torem2 at jabber.gicm.net/Gabbertypechatbodytest12<message
xmlns='jabber:client' type='chat'
to='rem2 at jabber.gicm.net/Gabber'><body>test12</body></message>/1.0smmessagetorem at jabber.gicm.net/Gabbertypechatfromrem2 at jabber.gicm.net/Gabberc2s8sm3ecb1a2fa6ab72469a235af11aecd9fe7cf9fcdcbodytest11<route
xmlns='http://jabberd.jabberstudio.org/ns/component/1.0'
Seq:='db93e84c6f209da33c7c1c56645fe4c0:135' from='jabber.gicm.net'
to='c2s'><message
xmlns:sm='http://jabberd.jabberstudio.org/ns/session/1.0'
xmlns='jabber:client' sm:sm='3ecb1a2fa6ab72469a235af11aecd9fe7cf9fcdc'
sm:c2s='8' from='rem2 at jabber.gicm.net/Gabber' type='chat'
to='rem at jabber.gicm.net/Gabber'><body>test11</body></message></route><message
xmlns='jabber:client' from='rem2 at jabber.gicm.net/Gabber' type='chat'
to='rem at jabber.gicm.net/Gabber'><body>test11</body></message>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
My question is :
Is there a function that would allow me to extract just this sentence
: to='rem2 at jabber.gicm.net/Gabber' ??² I've tried nad_find_attr and
nad_find_elem but unsuccessfully :
attr = nad_find_attr(nad, 0, -1, "to", NULL); retuns 0 and allow me to
call NAD_AVAL(nad,attr) which returns the previous text.
elem_tmp = nad_find_elem(nad, 0, -1, "message", 1); returns -1, failed so.
any idea or suggestion ?
--
Remy Harel - remy.harel at gicm.fr
G.I.C.M - Distributed Systems & IT
Linux Registered User #224740
More information about the JDev
mailing list