I'm trying to show the last value in a multi-value XML field and it is not working (my terminology might be off, this is new stuff for me). Example XML:
<sodas>
<soda>
<name>Coke</name>
<isCaffinated>Yes</isCaffinated>
</soda>
<soda>
<Name>Sierra Mist</name>
<isCaffinated>No</isCaffinated>
</soda>
...
</sodas>
If set the xpath on a k2textbox to name using the dialog, I end up with:
/ns1:sodas/ns1:soda/ns1:name
This sets the field to the first node (Coke), but what I want is the last node. So I change it to this:
/ns1:sodas/ns1:soda[last()]/ns1:name
I think my syntax is OK, but it does not work. The field is blank.
Any ideas on how to do this? I'm fine with just using a regular text box and setting the value in the PageLoad, but I don't know how to bind to the XML data (or how to loop through it).
Any ideas?
Using predicates on k2 fields
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.