import com.github.rgafiyatullin.xml.common.QName
import com.github.rgafiyatullin.xml.dom.Node
object jabberClient {
val ns = "jabber:client"
val error: QName = QName(ns, "error")
val presence: QName = QName(ns, "presence")
val iq: QName = QName(ns, "iq")
val message: QName = QName(ns, "message")
val body: QName = QName(ns, "body")
}
val message =
Node(jabberClient.message)
.withAttribute("type", "chat")
.withAttribute("from", "[email protected]")
.withAttribute("to", "[email protected]")
.withChildren(Seq(
Node(jabberClient.body)
.withChildren(Seq(Node("Helloes!")))
))
message.rendered.toString
// <message type='chat' from='[email protected]' to='[email protected]' xmlns='jabber:client'>
// <body>
// <![CDATA[Helloes!]]>
// </body>
// </message>
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
forked from RGafiyatullin/scala-xml
-
Notifications
You must be signed in to change notification settings - Fork 0
License
wgnet/scala-xml
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Scala 100.0%