[jdev] Vapor (C# XMPP Server)

Jonathan Dickinson jonathanD at k2.com
Fri Apr 4 04:10:02 CDT 2008


Hi All,

Vapor is successfully initiating a stream <rubs hands>. In any case, I have found that I have to 'trick' the .Net XML writer as far as writing only a start element, essentially:

            context.Writer.WriteStartElement("stream", "stream", Uris.Streams);
            context.Writer.WriteAttributeString("from", sn.From);
            context.Writer.WriteAttributeString("to", sn.To);
            context.Writer.WriteAttributeString("id", sn.Id);
            context.Writer.WriteComment("stream start");
            context.Writer.Flush();

This yields (at each step):

            <stream:stream

            <stream:stream from="server"

            <stream:stream from="server" to="bob at localhost"

            <stream:stream from="server" to="bob at localhost" id="stream_..."

            <stream:stream from="server" to="bob at localhost" id="stream_..."
             xmlns:streams="http://etherx.jabber.org/streams">
              <!-- stream start -->

Is this okay, or will I have to roll my own XML writer (is the comment invalid)? (Note that the default xmlns is missing, but this is just an example). Should I face any problems with any less xml conformant clients?

Now just to implement SASL plain <grin>.

-- Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20080404/d5aeaefb/attachment-0002.htm>


More information about the JDev mailing list