Hi,
I can create xml elements in designer, e.g. John Brinkman's example
// Add a question datagroup with the right question type
// then add a question subform to bind against it.
var vNewQ = xfa.datasets.createNode("dataGroup", "Question");
vNewType = xfa.datasets.createNode("dataValue", "QuestionType");
vNewType.value = vQDef.QuestionType.value;
vNewQ.nodes.append(vNewType);
vSection.dataNode.nodes.append(vNewQ);
However, I would like to create an attribute (I'm working with an existing predefined schema) but I can't seem to find a simple way, e.g.
I would like something like
<Question QuestionType=""/>
How can I do this? I tried loading the XML in like
var vNewType =
<Question QuestionType="">
</Question>;
xfa.data.mForm.loadXML(vNewType.toString(), false, false);
but unless I give it a child node, it bombs out. It will work with
var vNewType =
<Question QuestionType="">
<dummyRow/>
</Question>;
Any help would be worth 5 gold medals.