Login   Register  
PHP Classes
elePHPant
Icontem

File: php5_dom_xml.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of kostas gougakis  >  PHP 5 DOM XML  >  php5_dom_xml.php  >  Download  
File: php5_dom_xml.php
Role: Example script
Content type: text/plain
Description: php5_dom_xml
Class: PHP 5 DOM XML
Parse and manipulate XML documents with PHP 5 DOM
Author: By
Last change:
Date: 2004-09-04 15:01
Size: 299 bytes
 

Contents

Class file image Download
<?php
$dom 
= new DomDocument;
$dom->load("test.xml");
print 
"<pre>";
print 
$dom->documentElement->nodeName;
print 
"<br/>\n";
print 
$dom->getElementsByTagName("test")[0];

print_r(     $dom->getElementsByTagName("test"));         
print 
"<br/>\n";

print 
htmlentities($dom->saveXML());
?>