# Probably a simple xml problem

**URL:** <https://forum.kirupa.com/t/probably-a-simple-xml-problem/241661>\
**Category:** Uncategorized\
**Created:** [October 16, 2007, 7:34pm UTC](https://forum.kirupa.com/t/probably-a-simple-xml-problem/241661 "2007-10-16T19:34:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobj83](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bobj83](https://forum.kirupa.com/u/bobj83)\
**Post date:** [October 16, 2007, 7:34pm UTC](https://forum.kirupa.com/t/probably-a-simple-xml-problem/241661/1 "2007-10-16T19:34:33Z")

</div>

I’m goin’ crazy! I’m confused about the difference between an element node and a text node. I’m loading xml nodes from a php page. Here is a piece of the xml:

\<tierOneArray\>  
\<item id=“207” galleryID=“3” moduleID=“0”\>  
\<photoFile\>photo\_gallery207.jpg\</photoFile\>  
\<caption\>pic 02\</caption\>  
\<credit\>unknown\</credit\>  
\<creditURL\>unknown\</creditURL\>  
\<uploadDate\>2007-09-28 05:38:39\</uploadDate\>  
\<module\>gallery\</module\>  
\</item\>  
(followed by many items, and terminating with \</tierOneArray\>

When I ask for the firstChild.firstChild.firstChild I literally get “\<photoFile\>photo\_gallery207.jpg\</photoFile\>”.

When I ask for firstChild.firstChild.firstChild.nodeValue, I get “null”.

When I ask for the nodeType, I get “1”.

**So I have several questions:**

How does flash know that it’s not a text node? If I were using Flash to write the xml, I could use “createTextNode”, but it’s being written by another website.  
I need the “photo\_gallery207.jpg” without the tags. They are mostly urls. How do I do this?

I just don’t get it.
