Hi,
I'm trying to set the xsi:nill attribute in an XML element by scripting. (Javascript)
The setAttribute method doesn't work. And manually adding a new and empty element doesn't work either.
When I leave a field which has binding empty, the nill attribute is automatically set to true.
Why can't I reproduce this by scripting? Does someone have a clue?
Thanks in advance!
Regards,
Kristof
Views
Replies
Total Likes
Does anybody have a clue? I still
need this...
Views
Replies
Total Likes
Hi Kristof,
I think you can only do this with a loadXML method, makes it very clumsy by the following code;
var dataItems = xfa.datasets.createNode("dataGroup","items");
xfa.datasets.data.nodes.append(dataItems);
dataItems.loadXML('<item xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>',false,true);
Will produce the following xml
<items>
<item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</items>
Good Luck
Bruce
Views
Replies
Total Likes