@raynbow- There are different types of materials that toy xylophones are made of, including metal, plastic, and wood. I think that the kind with metal keys could have sharp edges that a child could cut herself on. That is why I prefer toys that are made of plastic and wood for toddlers.
You should also consider the mallets that come with the xylophone, because you don't want to buy those with removable parts that could become choking hazards. Checking the package for warnings and recommended ages is a good way to find an age-appropriate xylophone for your niece.