Comunitatea PHP Romania
 

 
DOMDocument->saveXML

DOMDocument->saveXML

(no version information, might be only in CVS)

DOMDocument->saveXML -- Dumps the internal XML tree back into a string

Description

string DOMDocument->saveXML ( [object node])

Creates an XML document from the dom representation. This function is usually called after building a new dom document from scratch as in the example below. The node is used to output only the node rather than the entire document.

Exemplu 1. Creating a simple HTML document header

<?php
$doc
= new DOMDocument("1.0");
$root = $doc->createElement("HTML");
$root = $doc->appendChild($root);
$head = $doc->createElement("HEAD");
$head = $root->appendChild($head);
$title = $doc->createElement("TITLE");
$title = $head->appendChild($title);
$text = $doc->createTextNode("This is the title");
$text = $title->appendChild($text);
echo
"<PRE>";
echo
htmlentities($doc->saveXML());
echo
"</PRE>";
?>

See also DOMDocument->load(), DOMDocument->loadXML() and DOMDocument->save().

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink The eBay Song | Buy Cell Phone Only | Internet Advertising | Car Insurance | Car Accident Lawyer Los Angeles
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis