Hi,
I'm not familiar with the XML.parse() or XMLData.parse() functions. I can't identify the XML or XMLData objects. They are not declared and they are not XFA objects.
Still, it looks like you need to get and set a form/data value.
Here is an example getting the value of a form field:
Your have the following form:
someText
otherText
Use the SOM expression of the CNACompany field to access its value:
var CNAValue = form1.policies.CNACompany.rawValue;
If the value is not merged in the form, try searching the data DOM instead. For example:
var CNAValue = xfa.record.policies.CNACompany.value;
To set the value of a form field or data value, do as follows:
form1.policies.CNACompany.rawValue = newValue;
xfa.record.policies.CNACompany.value = "newValue";
Note: to get/set a value from the data file use the value property. To get/set a value from a form field, use the rawValue property.
Hope this helps,
Hélène
Adobe Systems Inc.
FYI
The Adobe XML Form Object Model Reference posted on the Developer Center contains several scripting examples in Appendix A.
LiveCycle Developer Center
http://www.adobe.com/devnet/livecycle/designing_forms.htmlAdobe XML Form Object Model Reference
http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_Model_Reference.pdf