View Full Version : XML reader to get read this particular xml format

10 Jul 2009, 3:59 AM
<facet field="hello" count="24">
<facetValue count="57">aaa</facetValue>
<facetValue count="56">bbb</facetValue>
<facetValue count="44">ccc</facetValue>
<facetValue count="44">ddd</facetValue>
<facetValue count="38">eee</facetValue>
<facetValue count="36">fff</facetValue>
<facetValue count="28">ggg</facetValue>
<facetValue count="23">hhh</facetValue>
<facetValue count="21">ggg</facetValue>

I need to access the data within the facetValues(i.e. aaa,bbb..etc)The count value will also change so i need to access the data within that, how can i configure my reader for that.
The solution which i tried was

{name:"data",mapping: '@count'} //this returns me the count values i wanr to get the data within...

lookin forward to suggestions

12 Jul 2009, 9:52 PM
Reply to this thread..

12 Jul 2009, 10:27 PM
Are you looking for:

record: 'facetValue',
fields: [
{name: 'count', mapping: '@count'},
{name: 'value', mapping: '/'}

12 Jul 2009, 10:32 PM
Yes this was wat i was looking for, thanks....