How can I access XML attributes in LiveCycle using JavaScript and XPath.
I've tried using:
mynodesFormData.item(i).Name.attributes.getNamedItem("someattr");
Thanks,
Issa
Views
Replies
Total Likes
you can use this code:
var myXML=XMLData.parse(xmlIn,false);
var access=XMLData.applyXPath(myXML,"//setFormAccess/access[1]/@value");
cononsole.println(access.value);
xmlIn is your xml, edit "//setFormAccess/access[1]/@value" to match your xml.
Yan.
Views
Replies
Total Likes
Be aware that this will not work for scripts that are executed on the server (for example, in Output). The XML scripting objects are supported by Reader/Acrobat.
Views
Replies
Total Likes
I figured it out.
I was simply able to use:
mynodesCRFormData.item(i).Name.englishName.value
mynodesFormData.item(i).Name.attribName.value;
where attribName is the name of the attribute and Name the name of the element.
Thanks,
Issa
Views
Replies
Total Likes