setIdAttribute example

$ele->setAttributeNS($this->nsStack[0][$prefix]$aName$aVal);
                } else {
                    $ele->setAttribute($aName$aVal);
                }
            } catch (\DOMException $e) {
                $this->parseError("Illegal attribute name for tag $name. Ignoring: $aName");
                continue;
            }

            // This is necessary on a non-DTD schema, like HTML5.             if ('id' === $aName) {
                $ele->setIdAttribute('id', true);
            }
        }

        if ($this->frag !== $this->current && $this->rules->hasRules($name)) {
            // Some elements have special processing rules. Handle those separately.             $this->current = $this->rules->evaluate($ele$this->current);
        } else {
            // Otherwise, it's a standard element.             $this->current->appendChild($ele);

            if (!Elements::isA($name, Elements::VOID_TAG)) {
                
Home | Imprint | This part of the site doesn't use cookies.