Tournament brackets

Hi all.
Im trying to brainstorm on the best way to create tournament brackets.
There should be only a few considerations.

XML - to read the data
number of teams, so the brackets can be created and can grow or shrink
drawing the brackets.

I’m more concerned with drawing the brackets than I am with the rest. All these years using flash and I’ve seldom used the linedraw, etc… command.

Any examples on drawing brackets?

this is for tournaments… team 1 vs 9 team 2 vs 8 … etc…