Tip: I think this can be shortened to <code>net_nodes = self.xmltreefile.find()...</code>  but what you have here is fine.  I'm not sure if that addition is into next yet anyway.