You are here

function XMLSchema::addElement in Salesforce Suite 5.2

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

* adds an element to the schema * *

Parameters

array $attrs attributes that must include name and type: * @see xmlschema * @access public

File

includes/nusoap.orig.php, line 1872

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 addElement($attrs) {
  if (!$this
    ->getPrefix($attrs['type'])) {
    $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
  }
  $this->elements[$attrs['name']] = $attrs;
  $this->elements[$attrs['name']]['typeClass'] = 'element';
  $this
    ->xdebug("addElement " . $attrs['name']);
  $this
    ->appendDebug($this
    ->varDump($this->elements[$attrs['name']]));
}