Results 1 to 2 of 2

Thread: Please Help Me - Suggest Example Using XML Reader

  1. #1

    Default Please Help Me - Suggest Example Using XML Reader


    I dont know how to filter out xml data.

    I want to display the xml data while entering input in input box. I am using xml reader to read the xm data. Actually it display all the xml data.

    It display lie forum search example template.

    Can any one help me to solve this?

    My xml file

    <?xml version="1.0" encoding="UTF-8"?>
    <records total="2">
    <sonordaugof>Ram Naresh</sonordaugof>

    <sonordaugof>Ram Naresh</sonordaugof>

    <sonordaugof>Ram Naresh</sonordaugof>

    <sonordaugof>Krishnan Shankar</sonordaugof>


    when i type a in input it should display only arun, arun.

    My js file

    var store = new{

    // load using HTTP
    url: 'sample.xml',

    // the return will be XML, so lets set up a reader
    reader: new{

    record: 'user',
    id: 'id'
    ,totalRecords: '@total'
    }, [
    {name: 'id', type: 'int'},
    {name: 'firstName'},
    {name: 'lastName'},
    {name: 'class'},
    {name: 'sec'},
    {name: 'sonordaugof'}

    // Custom rendering Template
    var resultTpl = new Ext.XTemplate(
    '<tpl for="."><div class="search-item">'
    ,'<h3><span>{id}{firstName} </span></h3>'
    ,'Son/Daughter of {sonordaugof}<br>',
    '{class}' ,
    '{sec} Section' ,

    var search = new Ext.form.ComboBox({

    store: store,
    typeAhead: true,
    loadingText: 'Searching...',
    width: 570,
    tpl: resultTpl,
    applyTo: 'search',
    itemSelector: '',
    onSelect: function(record){ // override default onSelect to do redirect
    window.location =

  2. #2
    Sencha User's Avatar
    Join Date
    Mar 2007
    DC Area =)


    40 posts and you don't know to use the code tags when posting?!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts