Xml Parsing

Hello,
I am getting a xml result after scanning qr code like this
<PrintLetterBarcodeData uid="345" name="pooja" gender="female" yob="1993"/>.
How i can get the value of uid,name,gender and yob using typescript and appending the value in html page?