title: Parse a YAML file
body: <p>This is the first time I am working with YAML files, so the first think I looked at was to find any library that could help me to parse the file.</p>
  
  <p>I have found two libraries, YamlBean and SnakeYAML. I am not sure which one that I am going to use.</p>
  
  <p>Here is an example of the file that I am trying to parse:</p>
  
  <pre><code>users:
    user1:
      groups:
      - Premium
    user2:
      groups:
      - Mod
    user3:
      groups:
      - default
  groups:
    Mod:
      permissions:
        test: true
      inheritance:
      - Premium
    default:
      permissions:
        test.test: true
      inheritance:
      - Mod
    Admin:
      permissions:
        test.test.test: true
      inheritance:
      - Mod
  </code></pre>
  
  <p>The file will change dynamical so I don't know how many users or groups the file would contain.</p>
  
  <p>The information I would like to fetch from this is the user name and the group like this:</p>
  
  <pre><code>user1 Premium
  user2 Mod
  user3 default
  </code></pre>
  
  <p>And from the groups only the group names, like this:</p>
  
  <pre><code>Mod
  default
  Admin
  </code></pre>
  
  <p>Anyone could get me started here? And what is the best library to use for this?
  YamlBean or SnakeYAML?</p>
  
  <p>I guess, I need to save the information in something that I easily could iterate over. </p>