Skip to content

nathan130200/XmppSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

218 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMPP#

Lightweight XMPP library.

nuget


Supported element types.


Element Factory

The XmppElementFactory class registers and maintains the mapping of all XML elements to their respective classes. Each element is qualified by a name (Tag name) and its namespace URI, when registered the parser will obtain this information and construct the class corresponding to the XML element. If the mapping does not exist, it will use a fallback by constructing an instance of XmppSharp.Dom.XmppElement.

Consider the example table below demonstrating how this mapping works:

Qualified Tag Name Namespace(s) Mapped Class
stream:stream http://etherx.jabber.org/streams XmppSharp.Protocol.Base.StreamStream
starttls urn:ietf:params:xml:ns:xmpp-tls XmppSharp.Protocol.Tls.StartTls
auth urn:ietf:params:xml:ns:xmpp-sasl XmppSharp.Protocol.Sasl.Auth

Note

Some cases (like iq, message, presence) have more than one namespace defined (because it depends on each specific side of connection), but they are declared in the same way. The difference is that more than one namespace is assigned to this element, so the XmppElementFactory can correctly map which one it will instantiate.

About

Lightweight XMPP library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages