Loading...
четвер, 26 грудня 2013 р.

jQuery XML parsing


Just a short note for myself about parsing XML by jQuery and getting attributes.
Let's assume that we have the following XML node structure: <session type="direct" name="test">10</session>
and now we are going to get all those values: 'session', 'direct', 'test' and '10', so:

(this).nodeName -> session
$(this).attr('type') -> direct
 $(this).attr('name') -> test
$(this).text() ->10



0 коментарі:

 
TOP