From: niklas | brueckenschlaeger Date: 2010-12-06T20:49:16+09:00 Subject: Re: Traverse YAML node tree with non-unique values --=-Df8/1z9OSPd/g+Eb+1s+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If you use YAML.parse, you'll get a YAML::Syck::Map. You can traverse that and build your hashes yourself. Use pp to get a picture of what's inside. On Mon, 2010-12-06 at 20:33 +0900, Martin C. wrote: > @Fritz: Thanks, however, I am not the one building the file, so I need= =20 > to process it as I get it. (This is just a simplification of course). >=20 > @Philip: Thanks for the suggestion, I was hoping there is an easier way. >=20 > I see the YAML library has a each_node method, so I was hoping there is= =20 > some alternative means to traverse the YAML nodes in the tree. >=20 --=-Df8/1z9OSPd/g+Eb+1s+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJM/M23AAoJEIQdQGZOjo82D6wQAIfBuqQZQ+VhRQsjcS8+0ELX 2LBEO51DFgI8pkbU3ivBaDLAiVhz1mWVXJh+0mV9PecOOOELD5cb8pq1k2ABJ0jz tYEq4exdZO0lhhKrTrPOAmdAXu4PcPViurcGn2vdP0fdexyGtkg0OmXQQInrMvg6 tMpbMS4x4toxw3Wst2Y45bUtRk2sOFfjqsVJIOyFufPdlzd5KkpzXbToOSqOygHU Nvnr8BPyJjJv53VvPNxlGwpyUZJM36vEhe8gnhS4NosWCysBoTxyutmKh445Ov4I nukyoQSyzbq+uaxTDxwSztjQpzZbJRAKbLcvU5VSq0OhksL+DLwoJ5ejYmH9W2xd n3+f8Bgopy/O/Bql4JixMbI6pJzCilmR8W4foRKxJGFPDaScgx7E90swTIUTZUby xMVKKbozjKcAbSiZmJKaOoAKWmmGc2USma2q9ISCCcFzAm8Zny5fHy5Pd2yOoMem a/mcYQzPs5IsoKWyT5CGHk1or/Y+HDsNjeIKHXnBuLn/5ACA8LG4wwXPdUpk42tX w7UY98A/W0jlVP5ikfELN8cyrKkPiGc1pKCa2ymuD5SlcH2gpOyf4wacBR0Kky+e tc+jA2dcrRw3AZtl42qi6d1RnRAWKZfq2y3lYOBxQb3XfuEjhmRawwEug4TGB60g LbA5Dz8HsmPVN4I1Rl4I =ZbI3 -----END PGP SIGNATURE----- --=-Df8/1z9OSPd/g+Eb+1s+--