public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); list($prefix, $ns) = each($this->namespaces); if ($xml->attributes($ns)) { $attributes = $xml->attributes($ns); } else { // fallback to global namespace if no attributes can be found $attributes = $xml->attributes(); } $this->value = (string) $attributes['value']; }
public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); $attributes = $xml->attributes(); $base = (string) $attributes['base']; if (strpos($base, ':') !== false) { // remove the namespace prefix $parts = explode(':', $base); $base = $parts[1]; } $this->base = $base; }
public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); $attributes = $xml->attributes(); $this->name = (string) $attributes['name']; $this->type = (string) $attributes['type']; if (strpos($this->type, ':') !== false) { // remove the namespace prefix $parts = explode(':', $this->type); $this->type = $parts[1]; } $this->minOccurs = (string) $attributes['minOccurs']; $this->maxOccurs = (string) $attributes['maxOccurs']; }
public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); $attributes = $xml->attributes(); $this->name = (string) $attributes['name']; }
public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); list($ns) = array_keys($xml->getNamespaces()); $this->elementCount = count($xml->children($ns, true)); }
public function __construct(SimpleXMLElement $xml, $level = 0) { parent::__construct($xml, $level); }