We'd like to be able to add some calculated values to the output that don't come from the input XML. For example, recently I used Jath to parse data for use in a Windows Metro application. The application UI is based around items and groups, and when I process my items, I want to assign them to a group, which is a reference to a group object.
We'd like to be able to add some calculated values to the output that don't come from the input XML. For example, recently I used Jath to parse data for use in a Windows Metro application. The application UI is based around items and groups, and when I process my items, I want to assign them to a group, which is a reference to a group object.
Here is an example:
var parsed = Jath.parse( [ '//notes', { id: 'Note_ID', title: 'Title', ... group: pageData.groups[0] } ], xmldoc );
Jath currently supports using an escape character to insert string literals, but It won't work in the case of something that isn't a string.