Discorax's House of w00t

A collection of technology lessons learned though doing. Sharing of code samples, tips and tricks for web design and development. Written by an interactive designer/developer for other designer/developers.

10.18.2007

U.S. States and Counties List as XML

So I'm helping a co-worker build an online form that requires a combo box of both U.S. states and the counties within those states. I figured I'd be able to find a database with this list somewhere or at the very least an XML or something useful. After 30 minutes of unsuccessful google'ing & wiki'ing I found an HTML site that had a list of the states and their counties.

So since I needed this data in a useful format and figured that it would be some information that I could use over and over again for other projects I made an XML file with all the data nicely formed so that everyone could use it for their online forms.

The data structure: (brackets removed because blogger won't display the list properly despite using a pre tag or textarea)

states updated="2003-02-04"
state
name Washington /name
abv WA /abv
counties
county King County /county
county Pierce County /county
/counties
/state
/states

The XML includes all 50 U.S. States and all of their counties as of Feb04, 2003.
Please respect my bandwidth and download this file for your uses but don't link directly to it.
Happy Coding. w00t.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home