As an aside, XML::Simple is a bit more predictable if you initialise it with
some extras, some of which are suggested in the docs,
my $xs = XML::Simple->new(KeyAttr => [], NoAttr => 1, RootName => undef);

(Sorry I haven't actually used XMLin!)

P

On Thu, Feb 12, 2009 at 11:27 AM, Nigel Hamilton <[email protected]> wrote:

> Hi All,
>
> I'm using Perl's XML::Simple to parse deeply nested XML and would like to
> extract a small list of elements about 4 levels down:
>
> A
>
>   B
>     C
>       D1
>       D2
>       D3
>
> Ideally I want to do this:
>
> my @list = XMLin($xml, { SomeAttribute => ButWhat? });
>
> and then:
>
> @list = ('D1', 'D2', 'D3')
>
> Does anyone know how to make XML::Simple do this?
>
> NIge
>
> p.s. I'm using it on top of XML::SAX::ExpatXS
>
>
>
> _______________________________________________
> BristolBathPM mailing list
> [email protected]
> http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm
>
>
_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to