- XPrint(HKEY("iq"), 0,
- XPROPERTY("type", TypeStr, TLen),
- XSPROPERTY("to", IQ->from),
- XSPROPERTY("id", IQ->id),
- TYPE_ARGEND);
+ if (supported_namespace) {
+ cprintf("<iq type=\"result\" from=\"%s\" ", xmlesc(xmlbuf, dom, sizeof xmlbuf) );
+ }
+ else {
+ cprintf("<iq type=\"error\" from=\"%s\" ", xmlesc(xmlbuf, dom, sizeof xmlbuf) );
+ }
+ if (!IsEmptyStr(iq_from)) {
+ cprintf("to=\"%s\" ", xmlesc(xmlbuf, iq_from, sizeof xmlbuf));
+ }
+ cprintf("id=\"%s\">", xmlesc(xmlbuf, iq_id, sizeof xmlbuf));