I am trying to extract the values from this xml file but can't seem to do it...

```
<?xml version="1.0" encoding="UTF-8"?>
<personReport xmlns="...">          
    <header>
        <creation>2016-10-15</creation>
    </header>
    <details>
    ...
    </details>
    <person id="person1">
        <personId personIdScheme="name of">joe</personId>
    </person>
    <person id="person2">
        <personId personIdScheme="name of">sam</personId>
    </person>
</personReport>

```

I am successfully able to extract data from other tags (such as header) using:

```
my $xml = XMLin($xml_file);
my $header = $xml->{header}
                  ->{creation};

```

I am trying to do the same thing but get the data (joe) out of `<person>`...

```
my $person_type = $xml->{personReport}
                      ->{person1}[1];

```

Any idea why this isn't working?