I will be interested on this too, here is what I have been doing so far (I am just learning Vala)
// Get the node's name
string node_name = iter->name;
switch (node_name){
case "host":
this.host = (string) iter->get_content ();
break;
case "username":
this.username = (string) iter->get_content ();
break;
case "password":
this.password = (string) iter->get_content ();
break;
case "database":
this.database = (string) iter->get_content ();
break;
case "port":
this.port = (int)iter->get_content ();
break;
}
But for obvious reasons this works fine with a very small and simple xml but when you get to a more complex and bigger xml then your performance will suffer greatly.