you got it nearly right, you just missed an "s" and a "[*]" in your expression.
The correct expression is:
xfa.resolveNodes("xfa.datasets.data.root.child[*]").length
xfa.resolveNode() will always give you an object of type "node" (http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000856.html) without a length property, while xfa.resolveNodes() will return a "list" (http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000853.html).
The "[*]" in the XFA SOM expression denotes the selection of all like named sibling nodes (http://partners.adobe.com/public/developer/en/xml/xfa_spec_3_1.pdf#page=101). Without it the result will always be just "1" (or "0" if there is no element at all).
Hope that helps,
Martin
xfa.resolveNode("xfa.datasets.data.root.child").length;
Thanks
--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To post to this group, send email to live...@googlegroups.com.
To unsubscribe from this group, send email to livecycle+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/livecycle?hl=en.