Forcing a change of line in xml

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

Forcing a change of line in xml

Post by biggipsy »

Good morning


I have another question

for addchild in xml i have this code

$xml = simplexml_load_file("noticias.xml");


echo $xml->principal->no ;
$filho = $xml->addChild('no'),"\n";
$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);



echo $xml->asXML("noticias.xml");
{
header("Location:visualizar_noticias.php");
}


But i need forcing the change line, this way he's write in same line....

Someone help's me ?

Thank's
Post Reply