Larry's first style, just prints out the structure
| use XML::Parser; $xml = "<z> a <x> b <x2> c </x2> d </x> e <y> f </y> g </z>"; $p = new XML::Parser( Style => 'debug' ); $p->parse($xml); \\ (a1 v1) z || a z \\ () z x || b z x \\ () z x x2 || c z x // z x || d z // z || e z \\ () z y || f z // z || g // |