ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
DOM 2 util. More...
Public Member Functions | |
docFromString (string $xml, ?string &$error_str) | |
validate (\DOMDocument $doc, ?string &$error, $throw=false) | |
path (\DOMDocument $doc, string $path) | |
changeName (\DOMNode $node, string $name, bool $keep_attributes=true) | |
addParent (\DOMNode $node, string $name) | |
replaceByChilds (\DOMNode $node) | |
deleteAllChildsByName (\DOMNode $parent, array $node_names) | |
deleteAllChilds (\DOMNode $parent) | |
setAttributes (?\DOMNode $node, array $attributes) | |
set attributes of a node More... | |
setAttribute (?\DOMNode $node, string $attribute, ?string $value) | |
setFirstOptionalElement (\DOMNode $parent_node, string $node_name, array $successors, string $content, array $attributes, bool $remove_childs=true) | |
searches for an element $node_name within the childs of $parent_node if no node is found, a new is created before the childs with names of $successors. More... | |
dump (\DOMNode $node) | |
setContent (\DOMNode $node, string $text) | |
getContent (\DOMNode $node) | |
addElementToList (\DOMNode $parent_node, string $a_node_name, array $a_successors, string $a_content, array $a_attributes) | |
Places a new node $a_node_name directly before nodes with names of $a_successors. More... | |
Static Protected Member Functions | |
static | xmlError (int $errno, string $errstr, ?string $errfile=null, ?int $errline=null, ?array $errcontext=null, bool $ret=false) |
DOM 2 util.
Definition at line 25 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::addElementToList | ( | \DOMNode | $parent_node, |
string | $a_node_name, | ||
array | $a_successors, | ||
string | $a_content, | ||
array | $a_attributes | ||
) |
Places a new node $a_node_name directly before nodes with names of $a_successors.
The content of the node is set to $a_content and the attributes to $a_attributes
Definition at line 279 of file class.DomUtil.php.
References null, ILIAS\COPage\Dom\DomUtil\setAttributes(), and ILIAS\COPage\Dom\DomUtil\setContent().
ILIAS\COPage\Dom\DomUtil::addParent | ( | \DOMNode | $node, |
string | $name | ||
) |
Definition at line 109 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::changeName | ( | \DOMNode | $node, |
string | $name, | ||
bool | $keep_attributes = true |
||
) |
Definition at line 87 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::deleteAllChilds | ( | \DOMNode | $parent | ) |
Definition at line 148 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::deleteAllChildsByName | ( | \DOMNode | $parent, |
array | $node_names | ||
) |
Definition at line 137 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::docFromString | ( | string | $xml, |
?string & | $error_str | ||
) |
Definition at line 39 of file class.DomUtil.php.
References ILIAS\$error, and null.
ILIAS\COPage\Dom\DomUtil::dump | ( | \DOMNode | $node | ) |
Definition at line 240 of file class.DomUtil.php.
Referenced by ilPCParagraphModelProvider\getModels().
ILIAS\COPage\Dom\DomUtil::getContent | ( | \DOMNode | $node | ) |
Definition at line 263 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::path | ( | \DOMDocument | $doc, |
string | $path | ||
) |
Definition at line 80 of file class.DomUtil.php.
Referenced by ilPCParagraphModelProvider\getModels(), ilPCTableModelProvider\getModels(), ilPCSectionModelProvider\getModels(), and ilPCPlaceHolderModelProvider\getModels().
ILIAS\COPage\Dom\DomUtil::replaceByChilds | ( | \DOMNode | $node | ) |
Definition at line 127 of file class.DomUtil.php.
ILIAS\COPage\Dom\DomUtil::setAttribute | ( | ?\DOMNode | $node, |
string | $attribute, | ||
?string | $value | ||
) |
Definition at line 168 of file class.DomUtil.php.
Referenced by ILIAS\COPage\Dom\DomUtil\setAttributes().
ILIAS\COPage\Dom\DomUtil::setAttributes | ( | ?\DOMNode | $node, |
array | $attributes | ||
) |
set attributes of a node
Definition at line 159 of file class.DomUtil.php.
References ILIAS\COPage\Dom\DomUtil\setAttribute().
Referenced by ILIAS\COPage\Dom\DomUtil\addElementToList(), and ILIAS\COPage\Dom\DomUtil\setFirstOptionalElement().
ILIAS\COPage\Dom\DomUtil::setContent | ( | \DOMNode | $node, |
string | $text | ||
) |
Definition at line 245 of file class.DomUtil.php.
Referenced by ILIAS\COPage\Dom\DomUtil\addElementToList(), and ILIAS\COPage\Dom\DomUtil\setFirstOptionalElement().
ILIAS\COPage\Dom\DomUtil::setFirstOptionalElement | ( | \DOMNode | $parent_node, |
string | $node_name, | ||
array | $successors, | ||
string | $content, | ||
array | $attributes, | ||
bool | $remove_childs = true |
||
) |
searches for an element $node_name within the childs of $parent_node if no node is found, a new is created before the childs with names of $successors.
the content of the node is set to $content and the attributes to $attributes
Definition at line 188 of file class.DomUtil.php.
References null, ILIAS\COPage\Dom\DomUtil\setAttributes(), and ILIAS\COPage\Dom\DomUtil\setContent().
ILIAS\COPage\Dom\DomUtil::validate | ( | \DOMDocument | $doc, |
?string & | $error, | ||
$throw = false |
|||
) |
Definition at line 60 of file class.DomUtil.php.
|
staticprotected |
Definition at line 27 of file class.DomUtil.php.