Hello
I Still search of a solution to change line in xml from php
I change my code
$xml = simplexml_load_file("noticias.xml");
echo $xml->principal->no;
$filho = $xml->addChild('no', '\n' ); // desta forma ela faz o parenteses a seguir <no>
$filho->addChild('marca','vazio');
$filho->addChild('titulo',$_POST['introducao_noticia']);
$filho->addChild('textopequeno',$_POST['texto_pequeno']);
$filho->addChild('textogrande',$_POST['texto_principal']);
$filho->addChild('link',$imagem_nome);
file_put_contents ("noticias.xml", $xml->asXML());
{
header("Location:visualizar_noticias.php");
}
My change is $filho = $xml->addChild('no', "\n" ) and edit the xml this way
<principal>
<no>
<marca>vazio</marca><titulo>a</titulo><textopequeno>a</textopequeno><textogrande>a</textogrande>< link>bc96f61c4311a55bf75d18a283fd6f6b.png</link></no><no>
<marca>vazio</marca><titulo>v</titulo><textopequeno>v</textopequeno><textogrande>v</textogrande>< link>b8f5c489ffdf79a0f3ef4acefb33180f.png</link></no></principal>
but i need change the line after </marca>, after </titulo>, after </textopequeno>, after </textogrande>, after </link> and after </no>
Someone help me? i need to have this done
thanks
Change line in xml
Moderator: General Moderators
Re: Change line in xml
This is the third time you've posted this question. Once is enough. If you don't get a reply that doesn't mean you can post it again and again until you do.
Use this thread folks - viewtopic.php?f=1&t=81477
Use this thread folks - viewtopic.php?f=1&t=81477