Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
XML Mapping problem, mapping attributes in the xml
17/06/2011
13:28
Avatar
abhisheksimion
Member
Members
Forum Posts: 4
Member Since:
17/06/2011
sp_UserOfflineSmall Offline

I have this xml

    <?xml-stylesheet type="text/xsl" href="csmclientiir.xsl"?>
<csmclient product="abc"   date="4/26/11 2:05 PM">
    <system>
        <osname>Linux
        </osname>
        <hostname>AbhishekNix
        </hostname>
        <release>2.6.18-128.el5
        </release>
        <filesystem>
            <file mount='/home/hp1'home='(innfs2:/vol/home/shome/home/hp1)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/par21'home='(innfs2:/vol/home/shome/home/par21)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/h231'home='(innfs2:/vol/home/shome/home/h231)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/avallin1'home='(innfs2:/vol/home/shome/home/avallin1)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/park'home='(innfs2:/vol/home/shome/home/park)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/sp1'home='(innfs2:/vol/home/shome/home/sp1)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/ganga1'home='(innfs2:/vol/home/shome/home/ganga1)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
            <file mount='/home/nbp1'home='(innfs2:/vol/home/shome/home/nbp1)'total='1717567488' free='644306780'used='1073260708' percentage='62' />
        </filesystem>
    </system>
    <product>
        <showtime>Tue Apr 26 14:05:23 2011
        </showtime>
    </product>
</csmclient>

In which i'd like to use csmclient>system>filesystem>file.. attributes

I used something like below, which only shows me header

jQuery("#listTable").jqGrid({
url: cpath, 
datatype: "xml",
colNames:["Total Space","Free Space","Used Space", "Used Percentage"], 
colModel:[ {name:"Total Space",index:"Total Space", width:90, xmlmap:"system>filesystem>file>@total"},
{name:"Free Space",index:"Free Space", width:120, xmlmap:"system>filesystem>file>@free"},
{name:"Used Space",index:"Used Space", width:180,xmlmap:"system>filesystem>file>@used"},
{name:"Used Percentage",index:"Used Percentage", width:100, align:"right",xmlmap:"system>filesystem>file>@percentage", sorttype:"float"}
],
height:250,
pager: '#pager',
rowNum:10,
rowList:[10,20,30], 
viewrecords: true, 
gridview: true,
loadonce: true, 
xmlReader: { 
root : "csmclient",
row: "system>filesystem",
repeatitems: false,
id: "ASIN"
},
caption: "Disk Usage"
});

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
52 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information