Introduction
I figured this could come in handy to anyone who needed it so I just threw it together. I got tired of not having a list of states. I so often have to implement a dropdown or validate an input that takes an abbreviation and always have to get the information from some website that has a similar list. So this time I finally got smart and made an XML file out of it.
I got the information from the USPS website.
The file uses a very simple structure:
<states>
<state name="ALABAMA" abbreviation="AL" />
<state name="ALASKA" abbreviation="AK" />
...
</states>
That's all there is to it. Hope you find this useful.
Jason has been coding professionally since 1998. He is an expert with Java, J2EE, C#, .NET, and VB.