NationStates Jolt Archive


XML Feed Problem

Jasque
17-07-2004, 20:43
Over the past few months I have been working on an economic simulator for NationStates that requires me to use the XML feed. I have been running my tests through Microsoft Excel, and importing the XML feed into the spreadsheet. This worked perfectly fine on the old server, but with the new server Excel no longer imports every field from the XML feed. On top of that, it adds an extra field for every numerical value it imports.

I know almost nothing about how XML feeds operate, but I do know that the problem is the result of something that was changed along with the servers. If anybody could help identify the problem or suggest a work around method, I would be greatly appreciative. I have months of work invested in this project, and the change in the XML feed has seriously damaged my ability to continue.

Here is what I CAN import for my own nation (Jasque) and most others. Notice that, among many others, population and the income tax rate are missing. These are rather important for my economic model, so I’d like to have them back. Also, notice the “#agg” fields. These will be created for anything with a numerical value (including currency or animal, if you input a number for those categories). This was not the case when the old server handled the XML feed.

/ANIMAL
/CATEGORY
/CURRENCY
/FLAG
/FREEDOM/CIVILRIGHTS
/FREEDOM/ECONOMY
/FREEDOM/POLITICALFREEDOM
/FULLNAME
/GOVT/ADMINISTRATION
/GOVT/ADMINISTRATION/#agg
/GOVT/COMMERCE
/GOVT/COMMERCE/#agg
/GOVT/DEFENCE
/GOVT/DEFENCE/#agg
/GOVT/EDUCATION
/GOVT/EDUCATION/#agg
/GOVT/ENVIRONMENT
/GOVT/ENVIRONMENT/#agg
/GOVT/HEALTHCARE
/GOVT/HEALTHCARE/#agg
/GOVT/LAWANDORDER
/GOVT/LAWANDORDER/#agg
/GOVT/PUBLICTRANSPORT
/GOVT/PUBLICTRANSPORT/#agg
/GOVT/SOCIALEQUALITY
/GOVT/SOCIALEQUALITY/#agg
/GOVT/SPIRITUALITY
/GOVT/SPIRITUALITY/#agg
/GOVT/WELFARE
/GOVT/WELFARE/#agg

I know the XML feed includes everything I need and that it works for web based methods (as used in The Meritocracy’s census), but I can no longer import the entire XML feed into Excel. I haven’t changed anything on my side, so my conclusion is that something must be different on the NS side.

Thank you in advance for your attention to this problem.
Enerica
18-07-2004, 13:41
That's odd I have no problem, what xml file link are you using?
Celdonia
18-07-2004, 14:47
Did I notice that there's some new government priority data been added to the XML feed? (New as in it wasn't there at the beginning but I don;t know if it was added after the Jolt move or not).

It hasn't affected my census page but I'm only looking at the tags I want so it might affect an import into Excel depending upon how its being done.

In saying that, I could be talking rubbish and the feed hasn't changed at all - it's just a recollection I have.
Enerica
18-07-2004, 18:04
I want them to add something about trade to the xml feed :(

But I don't know what, sort of percentage GDP trade
Jasque
18-07-2004, 20:52
That's odd I have no problem, what xml file link are you using?

The link is: www.nationstates.net/cgi-bin/nationdata.cgi/nation=XXXX (http://www.nationstates.net/cgi-bin/nationdata.cgi/nation=XXXX)

Is there a newer link I should use? I have to admit I don't watch the tech forums that often. Most of my NS game time is spent on offsite forums.

And, Enerica, we should get together and talk sometime soon. I've been doing a lot of work on an economic model, and it is coming together nicely. You might be interested in some of my work, and perhaps you'll be interested enough to participate. My economic model is based off of the XML feed, and it generates realistic values for, among many things, national savings, national investment, GDP (of course), interest rates, net trade, income distribution across sectors of the population, disposable personal income, the capital to labor ratio, and more. I also developed a system for a central bank, based on the federal reserve system, that can be run on a fiat currency or a gold, silver, or bimetal standard. These are the things that I have finished, or nearly finished. There is a lot more to come. ;)
Enerica
18-07-2004, 21:13
The link is: www.nationstates.net/cgi-bin/nationdata.cgi/nation=XXXX (http://www.nationstates.net/cgi-bin/nationdata.cgi/nation=XXXX)

Is there a newer link I should use? I have to admit I don't watch the tech forums that often. Most of my NS game time is spent on offsite forums.

And, Enerica, we should get together and talk sometime soon. I've been doing a lot of work on an economic model, and it is coming together nicely. You might be interested in some of my work, and perhaps you'll be interested enough to participate. My economic model is based off of the XML feed, and it generates realistic values for, among many things, national savings, national investment, GDP (of course), interest rates, net trade, income distribution across sectors of the population, disposable personal income, the capital to labor ratio, and more. I also developed a system for a central bank, based on the federal reserve system, that can be run on a fiat currency or a gold, silver, or bimetal standard. These are the things that I have finished, or nearly finished. There is a lot more to come. ;)

Yes I'm very interested, feel free to PM to talk at some point, I've been making a calculator using Javascript and the MS XMLDOM, but for some reason it doesn't work on the internet, however I think that's due to the host I use.

The link seems fine, you said you were using Excel, try starting a new sheet and just importing all the data and see if it works, test it with your own nation first, or something like that. Just to see.
Enerica
18-07-2004, 21:16
Ah I just did an Excel test, and yes I have the same problem, but it only misses the lastlogin data etc.
Jasque
21-07-2004, 06:43
Perhaps Excel has a cut off then. Although it doesn't seem like it would...

When I import data it shows up in alphabetical order, and I can't get anything past "G" for the NS XML data.