Home
PHP
Application
Php Manual
Pictures
GuestBook
 
 
  Introduction Dlog Aprint SpTpl 
  Yap Xml2Array

 

 

 
 
 
Ex. index Dump the array Child exist
Attributes loop Childs loop 
   
   

Does exists the requested child?

This example shows how checks if the requested child exists.

<?php

require 'CXml2Array.php';

$InName='test.xml';
if(!
$TplDom = domxml_open_file(realpath($InName)))
   
trigger_error('Error parsing the file ',E_USER_ERROR);

$root = $TplDom->document_element();
$x=new CXml2Array($root);

// test the retrieve functions
echo 'Exist tag pippo ? '.(($x->ExistTag('pippo'))?'Y':'N').'<br>';
echo
'Exist tag menul ? '.(($x->ExistTag('menul'))?'Y':'N').'<br>';

?>
 

Copyright © 2003-2008 Darvin Andrioli, last change 29/12/2003