# Images and XML?

**URL:** <https://forum.kirupa.com/t/images-and-xml/259720>\
**Category:** programming\
**Created:** [May 8, 2008, 4:32am UTC](https://forum.kirupa.com/t/images-and-xml/259720 "2008-05-08T04:32:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![K1RK](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@K1RK](https://forum.kirupa.com/u/K1RK)\
**Post date:** [May 8, 2008, 4:32am UTC](https://forum.kirupa.com/t/images-and-xml/259720/1 "2008-05-08T04:32:24Z")

</div>

How do I go about calling an image from a xml file in php?

My .xml file looks a bit like this;

\<image1\>…/work/example1.jpg\</image1\>  
\<image2\>…/work/example2.jpg\</image2\>  
\<image3\>…work/example3.jpg\</image3\>

I have tried several tests to get these urls to appear as images but as yet to no cigar. Some options I have tried include

\<div id=“equalright” class=“border”\>\<fo:external-graphic src="{image2}"/\>\</div\>

And

\<div id=“equalright” class=“border”\>\<img src="\<?php echo $image4; ?\>"\>\</div\>

I cant seem to find many other examples from the internet.

---

<div class="post-metadata">

**Author:** ![Esherido](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/esherido/32/2158_2.png) [@Esherido](https://forum.kirupa.com/u/Esherido)\
**Post date:** [May 8, 2008, 6:58pm UTC](https://forum.kirupa.com/t/images-and-xml/259720/2 "2008-05-08T18:58:15Z")

</div>

^ I wrote a tutorial on using SimpleXML a year or two ago if you are interested, K1RK. [http://www.kirupa.com/developer/php/php5\_simpleXML.htm](http://www.kirupa.com/developer/php/php5_simpleXML.htm)
