[RESOLVED] JScript & XML - Data Breakup
Hi All
I trying to write a Vista Gadget which will retrieve internet usage from a XML feed. The gadget is now retrieving the data and placing it into a variable. How would I go about breaking the following example up?
XML Feed Return:
ADSL 2 40GB - $79.00 804012.621.4814.5028.712008-04-30T00:00:002008-05-30T00:00:00
Formatted:
ADSL 2 40GB
$79.00
80
40
12.62
1.48
14.50
28.71
Any examples would be much appreciated
Re: JScript & XML - Data Breakup
Why not parse it as XML rather than as a string if you're receiving it from an XML feed? You can parse it on a per item basis, get the various nodes and their values out and then format it.
Re: JScript & XML - Data Breakup
Cheers mendhak. I parsed it as XML and was able to get the values from each node :thumb:
Re: [RESOLVED] JScript & XML - Data Breakup
Good work, if you're feeling generous, share your code so that future searchers can use it too. Your code for the vista gadget could be a good codebank submission if you have instructions for setting up the 'shell' for the gadget as well.