Best CSS method for a vertical tree list? (example inside)

Here’s one I’ve put together (in a rush, sorry for the bad text!):

Here’s another one I googled:

I’d like to hear your thoughts on what is the best way to do this with CSS.

I’ve found a tutorial similar, they’ve simply styled their unordered lists:

However, mine will contain tables of data, much similar to the googled example. In that case how should I store this data so that I can style it easily? (XML?) I have no idea how to store all the parent-child / node data as of now.