ten DOM dodaje zawsze na koncu tekstu
i niewiem jak tam wstawic enter albo jakies spacje
aby w notatniku mozna bylo lepiej czytac.
jak to zrobic?

wogole sa jakies poradniki po polsku do tego xml w php?

<?php // v1.00 $qbNick = $_POST['qbNick']; $qbMail = $_POST['qbMail']; $qbContent = $_POST['qbContent']; /* korekcja slashy */ /* korekcja < */ /* korekcja > */ $ipek="$REMOTE_ADDR"; if ($qbNick != 'Kisiol_Ent.') { if ($qbNick == 'vip:kisiol666') $qbNick = 'Kisiol_Ent.'; { } else { } // zapisanie do pliku XML $qbDOC = new DOMDocument('1.0'); $qbDOC->load('QBook.xml'); $qbDOC->preserveWhiteSpace = false; $qbDOC->formatOutput = true; // pobierz glowny element $qbROOT = $qbDOC->documentElement; // stworz element Person $qbPERSON = $qbDOC->createElement('Person'); $qbPERSON = $qbROOT->appendChild($qbPERSON); // stworz dziecko Nick $qbNICK = $qbDOC->createElement('Nick'); $qbNICK = $qbPERSON->appendChild($qbNICK); $qbNICK_text = $qbDOC->createTextNode($qbNick); $qbNICK_text = $qbNICK->appendChild($qbNICK_text); // stworz dizecko Mail $qbMAIL = $qbDOC->createElement('Mail'); $qbMAIL = $qbPERSON->appendChild($qbMAIL); $qbMAIL_text = $qbDOC->createTextNode($qbMail); $qbMAIL_text = $qbMAIL->appendChild($qbMAIL_text); // stworz dziecko content $qbCONTENT = $qbDOC->createElement('Content'); $qbCONTENT = $qbPERSON->appendChild($qbCONTENT); $qbCONTENT_text = $qbDOC->createTextNode($qbContent); $qbCONTENT_text = $qbCONTENT->appendChild($qbCONTENT_text); $qbIP = $qbDOC->createElement('IP'); $qbIP = $qbPERSON->appendChild($qbIP); $qbIP_text = $qbDOC->createTextNode($ipek); $qbIP_text = $qbIP->appendChild($qbIP_text); $pokaz = "$year-$month-$mday, $time"; $qbTIME = $qbDOC->createElement('Time'); $qbTIME = $qbPERSON->appendChild($qbTIME); $qbTIME_text = $qbDOC->createTextNode($pokaz); $qbTIME_text = $qbTIME->appendChild($qbTIME_text); // zapisz do pliku $qbDOC->save('QBook.xml'); } else { } ?>
<?php $qbDOC->preserveWhiteSpace = false; $qbDOC->formatOutput = true; ?>