Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » Blog Archive » Load XML file in PHP

Load XML file in PHP

class doc

{

bool load_doc ( string filename )

}

Loads and XML document from a file.

Examples:

 

<?php
$document1
= DOMDocument::load(‘example.xml’);
echo
$document1->saveXML();

$document1 = new DOMDocument();
$docoument1->load(‘book.xml’);
echo
$document1->saveXML();
?>

Posted By:V.Mahesh

Posted by Mahesh ( Tryangled )

Leave a Reply

You must be logged in to post a comment.