Toms Homepage
  Home    Downloads    Your Account    Forums  
  Create an account
Modules
· Home
· Games
· My Gallery
· PHP Manual
· PHP-Nuke HOWTO
· Web Links
· Your Account
 
Who's Online
Welcome, Anonymous
Nickname

Password

Security Code
Security Code
Type Security Code


(Register)

Membership:
Latest: GenevaSew
New Today: 637
New Yesterday: 619
Overall: 44109

People Online:
Visitors: 78
Members: 12
Total: 90

Online Now:
COM MonikaFIA
 PrestonSc
COM LetaB95
COM LemuelRed
 DillonWya
COM WXAGlenn
INFO EugenioPa
COM MariamWeb
COM Lionel51V
COM DulcieDev
COM MaikFrazi
COM RandalLan
 
DOMDocument->validate()

DOMDocument->validate()

DOMDocument->validate() --  Validates the document based on its DTD

Description

class DOMDocument {

bool validate ( void )

}

Validates the document based on its DTD.

You can also use the validateOnParse property of DOMDocument to make a DTD validation.

Return Values

Returns TRUE on success or FALSE on failure. If the document have no DTD attached, this method will return FALSE.

Examples

Example 1. Example of DTD validation

<?php
$dom
= new DOMDocument;
$dom->Load('book.xml');
if (
$dom->validate()) {
    echo
"This document is valid!\n";    
}
?>

You can also validate your XML file while loading it:

<?php
$dom
= new DOMDocument;
$dom->validateOnParse = true;
$dom->Load('book.xml');
?>


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004 by Tom Nitzschner.
Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.120 Seconds

:: VereorLCARS phpbb2 style by Vereor :: PHP-Nuke theme by www.nukemods.com ::