[Mono-dev] MS/Mono XmlWriter incompatibility

Vincent Daron vdaron at ask.be
Mon Feb 13 17:47:23 EST 2006


Hi

I'm trying to send an XMPP stream header, th objective is to send that 
tag :

<stream:stream version="1.0" to="me at test.com" from="server" 
xmlns="jabber:client">

aWriter.WriteStartDocument();
aWriter.WriteStartElement("stream", 
"stream","http://etherx.jabber.org/streams");
aWriter.WriteAttributeString("version", "1.0");
aWriter.WriteAttributeString("from", "me at test.com");
aWriter.WriteAttributeString("to", "server");
aWriter.WriteAttributeString("xmlns", theXmlNamespace);
aWriter.WriteString("");// Ensure that the tag is closed
aWriter.Flush();

To mark the end of tag, and ensure that the ">" character is written, 
I'm using WriteString(""). Ugly, but works on Framework.NET 2.0.

on Mono 1.1.13.2 (windows), there is no closing character.

<stream:stream version="1.0"  to="me at test.com" from="server" 
xmlns="jabber:client"

Thanks

Vincent



More information about the Mono-devel-list mailing list