The man thing that is throwing me off is the jpegURL="whatever.jpg" part in the tag. Here is what I got so far
// create a new XML document
$doc = new_xmldoc('1.0');
// create root node
$root = $doc->add_root('Slides');
$member = $root->new_child('slideNode','image A');
$member = $root->new_child('slideNode','image B');
$member = $root->new_child('slideNode','image C');
$member = $root->new_child('slideNode','image D');
$fp = @fopen('slides.xml','w');
if(!$fp) {
die('Error cannot create XML file');
}
fwrite($fp,$doc->dumpmem());
fclose($fp);
Here is what I want the XML file to look like
<Slides>
<slideNode jpegURL="a.jpg">image A</slideNode>
<slideNode jpegURL="b.jpg">image B</slideNode>
<slideNode jpegURL="c.jpg">image C</slideNode>
<slideNode jpegURL="d.jpg">image D</slideNode>
</Slides>
Please keep in mind I want to do this properly and not use echo/print. Thanks in advance.