How to get all the unique node names in XMLReader? Let's say for example I have below XML data:
<a>
    <b>
        <firstname>John</firstname>
        <lastname>Doe</lastname>
    </b>
    <c>
        <firstname>John</firstname>
        <lastname>Smith</lastname>
        <street>Streetvalue</street>
        <city>NYC</city>
    </c>
    <d>
        <street>Streetvalue</street>
        <city>NYC</city>
        <region>NY</region>
    </d>
</a>
How can I get firstname, lastname, street, city, region from above XML data using XMLReader? Also the file is very big, so need to see performance also while getting the node names.
Thanks
 
     
     
    