My attached code works reasonably well with my testing XML.
There's an issue when it comes to matching the attributes on "New
Product B" depending on the order of the attributes. Obviously I've
still got a ways to go.
It took me a while just to get this far and I'm fading. Any
advice on building the XML schema? Any thoughts on the filtering
process? Perhaps I need to compare arrays to arrays...?
First off, I'm not responding because I'm a genius :-)
The schema chosen can make it easier to work with or it can
make things unnecessarily hard. What I'm suggesting below is one of
many different ways to do this, but if you can, use a schema where
the elements themselves are the check box values, then everything
is simplified in your code. You won't have to keep track of a ton
of stuff, especially the correct order as you found out with New
Note that you could also do <attributes wireless="true"
office="true" corded="false" />, etc. Then you'd refer to it in
your code as item.attributes["@" + i.id].
Just want to add that you could probably set the hard-coded
tempObj once in an init() handler. Then instead of resetting all 3
checkboxes each time add a call to a function that'll set the
'selected' property based on the event.currentTarget...