In BB 3.x we were able to send the content of a node by using
<s:task b:action="send" b:url="saveform" b:source="id('mainDiv')" b:autoroot="true" b:destination="$tempResponseStore"/>
We were advised that bb.xml.serializtion was the way to go in 4.1.2 but whenever we use
bb.xml.serialize(bb.document.getElementById('mainDiv'),false)
the result comes as 'undefined'
A simple example below illustrates the problem.
<div>
<e:handler event="click" type="text/javascript">
bb.console.dirxml(bb.document.getElementById('pat'));
alert(bb.xml.serialize(bb.document.getElementById('pat'),false));
</e:handler>
<div id='pat'>ola <span> hello </span>
</div>
</div>
<e:handler event="click" type="text/javascript">
bb.console.dirxml(bb.document.getElementById('pat'));
alert(bb.xml.serialize(bb.document.getElementById('pat'),false));
</e:handler>
<div id='pat'>ola <span> hello </span>
</div>
</div>
What are we missing?

use viewNode or modelNode
27 February, 2008 - 08:26 — huanhoHello risala,
when you use bb.document.getElementById('pat'), you are getting a Controler object, that don't have a direct xml representation.
You must use the modelNode or viewNode property of your div :
Anyone know the use of XMLSerializer.serializeToString? this don't work for me.
use viewNode or modelNode
27 February, 2008 - 09:23 — yudiHi huanho,
Try this one.This works for me.
~Yudi
Global Object
27 February, 2008 - 15:18 — huanhoOk, thanks Yudi.
It's clear, i don't tried to create a new instance. I think the reference is confusing, appear the following sentence , "XMLSerializer is a global JavaScript object"
But thank for your help, is only a suggestion :D