in reply to Reading XML LibXML

The reason for the uninitialized message is you are incrementing $i between the assignment to $tmpinfo[$i] and printing $tmpinfo[$i].