# Parsing this simple xml file in php

**URL:** <https://forum.kirupa.com/t/parsing-this-simple-xml-file-in-php/224731>\
**Category:** Uncategorized\
**Created:** [May 4, 2007, 8:34pm UTC](https://forum.kirupa.com/t/parsing-this-simple-xml-file-in-php/224731 "2007-05-04T20:34:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![susancbk](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@susancbk](https://forum.kirupa.com/u/susancbk)\
**Post date:** [May 4, 2007, 8:34pm UTC](https://forum.kirupa.com/t/parsing-this-simple-xml-file-in-php/224731/1 "2007-05-04T20:34:21Z")

</div>

I need to grab the data in the _username_ tag from the following xml doc  
[http://api.flickr.com/services/rest/?method=flickr.people.findByUserna me&api\_key=3d5a7edd1fdfd7a030acaa740f2b5bbc&username=susanbuck&auth\_to ken=72157600176356413-e7a9878439beb484&api\_sig=faaedcabce23e19fc5fe9e7 a959c56cb](http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&api_key=3d5a7edd1fdfd7a030acaa740f2b5bbc&username=susanbuck&auth_token=72157600176356413-e7a9878439beb484&api_sig=faaedcabce23e19fc5fe9e7a959c56cb)

what is the most simple code I can use to do this?  
i’ve been researching all day on parsing xml with php… I came across the tutorial here [http://www.kirupa.com/web/xml\_php\_parse\_beginner.htm](http://www.kirupa.com/forum/../web/xml_php_parse_beginner.htm) and got the example to work, but it broke when i tried it on the above url i need to parse…

I know its a simple task, and i’ve spent enough time trying to figure it out so i figured i’d go to the experts. ![](http://www.ozzu.com/images/smiles/icon_smile.gif)
