Hi, things seem to be much more difficult respect to smack, maybe due to lack of documentation…I have an IQ packet and I want to add an extension so I made a custom class with this serialize method:
public function serialize( parent:XMLNode ):Boolean
{
if (exists(getNode().parentNode)) {
return false;
}
var node:XMLNode = getNode().cloneNode(true);
var node:XMLNode = new XMLNode(1,“ciao”);
var extensions:Array = getAllExtensions();
for (var i:int = 0; i < extensions.length; i++) {
if (extensions[i] is ISerializable) {
ISerializable(extensions[i]).serialize(node);
}
}
parent.appendChild(node);
return true;
}
I copied it from other extension classes and here’s my problem:
IQ packet has the following (wrong) sintax:
<iq …> < text </first element> />
How can I solve this?Where is the error?T_T
(btw…why use XMLNode in the first place??New AS3 XML class is way better!)