XML_DTD
[ class tree: XML_DTD ] [ index: XML_DTD ] [ all elements ]

Class: XML_DTD_XmlValidator

Source Location: /XML_DTD-0.5.2/DTD/XmlValidator.php

Class Overview


XML_DTD_XmlValidator


Author(s):

Version:

  • Release: 0.5.2

Copyright:

  • 2003-2008 Tomas Von Veschler Cox

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 86]
XML_DTD_XmlValidator

Usage:

  1.  $validator XML_DTD_XmlValidator;
  2.  // This will check if the xml is well formed
  3.  // and will validate it against its DTD
  4.  if (!$validator->isValid($dtd_file$xml_file)) {
  5.    die($validator->getMessage());
  6.  }



[ Top ]


Class Variables

$dtd = array()

[line 89]


Type:   mixed


[ Top ]



Method Detail

getMessage   [line 290]

string getMessage( )

XML_DTD_XmlValidator::getMessage()

Gets all the errors the validator found in the conformity of the xml document

  • Return: the error message

[ Top ]

isValid   [line 103]

bool isValid( string $dtd_file, string $xml_file)

XML_DTD_XmlValidator::isValid()

Checks an XML file against its DTD

  • Return: True if the XML conforms the definition
  • Access: public

Parameters:

string   $dtd_file   —  The DTD file name
string   $xml_file   —  The XML file

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:31:18 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.