From: Robert Klemme Date: 2008-03-31T18:21:36+09:00 Subject: Re: rexml to slow 2008/3/31, Bu Mihai : > Im trying to build a map and to memorize all routes. I have a root node > wich will generate some roads and each road will generate another roads > and i have to go on all roads until there is no road unchecked. > If im on a road and that road generates new roads then to go an all > generated road i must begin my route from the begining not from the road > who generates his child roads. Ok, a pretty straightforward graph problem. It is a bad idea to do that on the raw XML data. You should create a representation of the road data that suits your algorithm better. Then read the whole XML only once, create that representation and implement your algorithm on your internal representation. Doing it on the XML is certainly the worst option. Kind regards robert -- use.inject do |as, often| as.you_can - without end