Not logged in. · Lost password · Register
Forum: agsXMPP RSS
trw1313 #1
Member since Oct 2009 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: Send Test XML Message
From my application, I wanted to give the user a diagnostic tool to send a test
message which is XML.

Basically, I would like a way to take a complete message formatted in XML that was
dropped into a textbox and send that message.

Is this possible without parsing the XML itself and break down all the properties?


Message msg = new Message();
msg = xmlMsg;  // where this string represents an entire Message to be sent

Hopefully, this explanation of what I'm looking for is clear.


Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can use the LoadXml member of Element which parses and loads the Xml.
But you can also send any String with with the Send member overload of XmppClientConnection which accepts a String. If you choose 2 make your that the string you send is valid Xml, or a chunk of valid Xml. When you send invalid Xml the server disconnects you.

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 RSS