Some notes of the stanza and session structures
[prosody.git] / doc / stanza.txt
diff --git a/doc/stanza.txt b/doc/stanza.txt
new file mode 100644 (file)
index 0000000..7f18ddd
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Structure of a stanza:\r
+\r
+\r
+stanza {\r
+       --- properties ---\r
+       tags -- array of tags\r
+       \r
+       --- static methods ---\r
+       iq(attrs) -- \r
+       \r
+       --- read-only methods ---\r
+       reply -- return new stanza with attributes of current stanza\r
+       child_with_name(string name) -- return the first child of the current tag with the matching name\r
+       \r
+       --- write methods ---\r
+       tag(name, sttrs) -- create a new child of the current tag, and set the child as current\r
+       up() -- move to the parent of the current tag\r
+       text(string) -- append a new text node to the current tag\r
+}\r