You are here

function XMLSchema::XMLSchema in Salesforce Suite 5.2

Same name in this branch
  1. 5.2 includes/nusoap.php \XMLSchema::XMLSchema()
  2. 5.2 includes/nusoap.orig.php \XMLSchema::XMLSchema()
Same name and namespace in other branches
  1. 5 includes/nusoap.php \XMLSchema::XMLSchema()
  2. 5 includes/nusoap.orig.php \XMLSchema::XMLSchema()

* constructor * *

Parameters

string $schema schema document URI: * @param string $xml xml document URI * @param string $namespaces namespaces defined in enclosing XML * @access public

File

includes/nusoap.orig.php, line 1037

Class

XMLSchema
parses an XML Schema, allows access to it's data, other utility methods no validation... yet. very experimental and limited. As is discussed on XML-DEV, I'm one of the people that just doesn't have time to read the spec(s) thoroughly,…

Code

function XMLSchema($schema = '', $xml = '', $namespaces = []) {
  parent::nusoap_base();
  $this
    ->debug('xmlschema class instantiated, inside constructor');

  // files
  $this->schema = $schema;
  $this->xml = $xml;

  // namespaces
  $this->enclosingNamespaces = $namespaces;
  $this->namespaces = array_merge($this->namespaces, $namespaces);

  // parse schema file
  if ($schema != '') {
    $this
      ->debug('initial schema file: ' . $schema);
    $this
      ->parseFile($schema, 'schema');
  }

  // parse xml file
  if ($xml != '') {
    $this
      ->debug('initial xml file: ' . $xml);
    $this
      ->parseFile($xml, 'xml');
  }
}