Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
kylixsales #1
Member since Feb 2007 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Convert a xml to IQ object?
Hello:
Can you tel me how to Convert a XML String to  an agsxmpp.protocol.client.IQ object?

Thanks!
i Wish Win!
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I don't understand your questions exactly, or the background of your questions.
You can use the Document class from agsXMPP.Xml.Dom to load Xml. But normally you should create the XML with the objects and not load them from a string.

Alex
Alexander Gnauck
AG-Software
Avatar
kylixsales #3
Member since Feb 2007 · 7 posts
Group memberships: Members
Show profile · Link to this post
I want to implement a user Search Query,but i don't know How can I get the supported query ID and the structure from the server, to filled in this search so I can send to the server and waittill I get my search result, then i try to build a XML query String directly and send it to search service,the code as show below:
 
IQstr = "<iq id='agsXMPP_2' to='" + sTo + "' type='set'><query xmlns='jabber:iq:search'><username>" + jid +"</username></query></iq>"
_connection.Send(IQstr)

but i want to use IQGrabber to process the result, then i want to convert this IQStr to an IQ object, such as below
dim sIQ as IQ
sIQ=ctype(iqstr,IQ)
_connection.IQGrabber.SendIQ(sIQ,addressof ResultProc,nothing)
but it's reports an error, could not covert the string to an object.how can i do it?

my english is very poor,i'm sorry.
i Wish Win!
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
look at the MiniClient, there is a complete search sample. There you can also see how to get the result packets in callbacks.

Alex
Alexander Gnauck
AG-Software
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP SDK Support RSS