Difference between revisions of "XML feed"

From NSwiki, the NationStates encyclopedia.
Jump to: navigation, search
 
m
Line 8: Line 8:
  
 
=== National Feed example ===
 
=== National Feed example ===
{?xml version="1.0" ?}  
+
{?xml version="1.0" ?}
-{NATIONINFO}
+
-{NATIONINFO}  
:{NAME}[[nation]]{/NAME}  
+
:{NAME} [[nation]] {/NAME}
:{TYPE}[[title]]{/TYPE}  
+
:{TYPE} [[national title]] {/TYPE}
:{FULLNAME}Fully qualified name{/FULLNAME}  
+
:{FULLNAME} Fully qualified name {/FULLNAME}
:{MOTTO}Your motto goes here!{/MOTTO}  
+
:{MOTTO} Your motto goes here! {/MOTTO}
:{CATEGORY}Game Category{/CATEGORY}  
+
:{CATEGORY} Game Category {/CATEGORY}
:{UNSTATUS}[[UN Delegate]]{/UNSTATUS}  
+
:{UNSTATUS} [[UN Delegate]] {/UNSTATUS}
-{FREEDOM}
+
-{FREEDOM}  
::{CIVILRIGHTS}Civil Rights Rating{/CIVILRIGHTS}  
+
::{CIVILRIGHTS} Civil Rights Rating {/CIVILRIGHTS}
::{ECONOMY}Economy Rating{/ECONOMY}  
+
::{ECONOMY} Economy Rating {/ECONOMY}
::{POLITICALFREEDOM}Political Freedom Rating{/POLITICALFREEDOM}  
+
::{POLITICALFREEDOM} Political Freedom Rating {/POLITICALFREEDOM}
:{/FREEDOM}
+
: {/FREEDOM}  
:{REGION}[[region!Region]]{/REGION}  
+
:{REGION} [[region|Region]] {/REGION}
:{POPULATION}Population in millions{/POPULATION}  
+
:{POPULATION} Population in millions {/POPULATION}
:{TAX}Tax percentage{/TAX}  
+
:{TAX} Tax percentage {/TAX}
:{ANIMAL}[[National Animal]]{/ANIMAL}  
+
:{ANIMAL} [[National Animal]] {/ANIMAL}
:{CURRENCY}[[National Currency]]{/CURRENCY}  
+
:{CURRENCY} [[National Currency]] {/CURRENCY}
:{FLAG}URL for flag{/FLAG}  
+
:{FLAG} URL for flag {/FLAG}
:{MAJORINDUSTRY}Major Industry{/MAJORINDUSTRY}  
+
:{MAJORINDUSTRY} Major Industry {/MAJORINDUSTRY}
:{GOVTPRIORITY}Government Spending priority{/GOVTPRIORITY}  
+
:{GOVTPRIORITY} Government Spending priority {/GOVTPRIORITY}
-{GOVT}
+
-{GOVT}  
::{ADMINISTRATION}% of Government spending{/ADMINISTRATION}  
+
::{ADMINISTRATION} % of Government spending {/ADMINISTRATION}
::{WELFARE}% of Government spending{/WELFARE}  
+
::{WELFARE} % of Government spending {/WELFARE}
::{HEALTHCARE}% of Government spending{/HEALTHCARE}  
+
::{HEALTHCARE} % of Government spending {/HEALTHCARE}
::{EDUCATION}% of Government spending{/EDUCATION}  
+
::{EDUCATION} % of Government spending {/EDUCATION}
::{SPIRITUALITY}% of Government spending{/SPIRITUALITY}  
+
::{SPIRITUALITY} % of Government spending {/SPIRITUALITY}
::{DEFENCE}% of Government spending{/DEFENCE}  
+
::{DEFENCE} % of Government spending {/DEFENCE}
::{LAWANDORDER}% of Government spending{/LAWANDORDER}  
+
::{LAWANDORDER} % of Government spending {/LAWANDORDER}
::{COMMERCE}% of Government spending{/COMMERCE}  
+
::{COMMERCE} % of Government spending {/COMMERCE}
::{PUBLICTRANSPORT}% of Government spending{/PUBLICTRANSPORT}  
+
::{PUBLICTRANSPORT} % of Government spending {/PUBLICTRANSPORT}
::{ENVIRONMENT}% of Government spending{/ENVIRONMENT}  
+
::{ENVIRONMENT} % of Government spending {/ENVIRONMENT}
::{SOCIALEQUALITY}% of Government spending{/SOCIALEQUALITY}  
+
::{SOCIALEQUALITY} % of Government spending {/SOCIALEQUALITY}
:{/GOVT}
+
: {/GOVT}  
:{LASTLOGIN}date in ?? format{/LASTLOGIN}  
+
:{LASTLOGIN} date in ?? format {/LASTLOGIN}
:{LASTACTIVITY}time in minutes{/LASTACTIVITY}  
+
:{LASTACTIVITY} time in minutes {/LASTACTIVITY}
:{/NATIONINFO}
+
:{/NATIONINFO}  
  
 
== Regional XML feed ==
 
== Regional XML feed ==

Revision as of 09:20, 5 October 2004

The NationStates XML feed

National XML feed

To access this feed, take the following URL and paste it into your browser window and change 'YourNation' to whichever nation you would like to see.

http://www.nationstates.net/cgi-bin/nationdata.cgi/nation=YourNation

National Feed example

{?xml version="1.0" ?} -{NATIONINFO}

{NAME} nation {/NAME}
{TYPE} national title {/TYPE}
{FULLNAME} Fully qualified name {/FULLNAME}
{MOTTO} Your motto goes here! {/MOTTO}
{CATEGORY} Game Category {/CATEGORY}
{UNSTATUS} UN Delegate {/UNSTATUS}

-{FREEDOM}

{CIVILRIGHTS} Civil Rights Rating {/CIVILRIGHTS}
{ECONOMY} Economy Rating {/ECONOMY}
{POLITICALFREEDOM} Political Freedom Rating {/POLITICALFREEDOM}
{/FREEDOM}
{REGION} Region {/REGION}
{POPULATION} Population in millions {/POPULATION}
{TAX} Tax percentage {/TAX}
{ANIMAL} National Animal {/ANIMAL}
{CURRENCY} National Currency {/CURRENCY}
{FLAG} URL for flag {/FLAG}
{MAJORINDUSTRY} Major Industry {/MAJORINDUSTRY}
{GOVTPRIORITY} Government Spending priority {/GOVTPRIORITY}

-{GOVT}

{ADMINISTRATION} % of Government spending {/ADMINISTRATION}
{WELFARE} % of Government spending {/WELFARE}
{HEALTHCARE} % of Government spending {/HEALTHCARE}
{EDUCATION} % of Government spending {/EDUCATION}
{SPIRITUALITY} % of Government spending {/SPIRITUALITY}
{DEFENCE} % of Government spending {/DEFENCE}
{LAWANDORDER} % of Government spending {/LAWANDORDER}
{COMMERCE} % of Government spending {/COMMERCE}
{PUBLICTRANSPORT} % of Government spending {/PUBLICTRANSPORT}
{ENVIRONMENT} % of Government spending {/ENVIRONMENT}
{SOCIALEQUALITY} % of Government spending {/SOCIALEQUALITY}
{/GOVT}
{LASTLOGIN} date in ?? format {/LASTLOGIN}
{LASTACTIVITY} time in minutes {/LASTACTIVITY}
{/NATIONINFO}

Regional XML feed

To access this feed, take the following URL and paste it into your browser window and change 'YourRegion' to whichever region you would like to see.

http://www.nationstates.net/cgi-bin/regiondata.cgi/region=YourRegion