ciao! ho un file xml strutturato cosi:
Codice PHP:
<template>
    <
header>
        <
background>#ffff</background>
        
<width>115px</width>
    </
header>
    <
div>
        <
background>#3242</background>
        
<width>80px</width>
    </
div>
    <
footer>
        <
background>#ccc</background>
        
<width>115px</width>
    </
footer>
    .
    .
    .
</
template
come posso stampare i valori di un determinato tag ??
ho in mente una cosa simile,vi butto una bozza:
Codice PHP:
$h=fopen("file.xml","r");
function 
cerca($tag,$sottotag)
{

while(?)
{
if(
trova($h,$tag)
{
    while(?)
    {
    if(
trova($h,$sottotag)
    echo 
$valore;
    }
}
}

in cui come parametri viene preso x esempio "header","background" e dovrà restituirmi il valore "#fff" andando a sfogliare prima tutti i tag principali,poi i sottotag.la funzione che ho chiamato trova chiaramente va sostiuita con una funzione reale! XD
spero di essere stato chiaro!