ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
php4DOMElement Class Reference

php4DomElement More...

+ Inheritance diagram for php4DOMElement:
+ Collaboration diagram for php4DOMElement:

Public Member Functions

 get_attribute ($name)
 
 owner_document ()
 
 get_elements_by_tagname ($name)
 
 has_attribute ($name)
 
 remove_attribute ($name)
 
 set_attribute ($name, $value)
 
 tagname ()
 
 set_content ($text)
 
 get_content ()
 
 unlink ($aDomNode)
 
 get_attribute ($name)
 
 get_elements_by_tagname ($name)
 
 has_attribute ($name)
 
 remove_attribute ($name)
 
 set_attribute ($name, $value)
 
 tagname ()
 
 set_content ($text)
 
 get_content ()
 
 unlink ($aDomNode)
 
- Public Member Functions inherited from php4DOMNode
 __construct ($aDomNode)
 
 append_child ($newnode)
 
 replace_node ($newnode)
 
 append_sibling ($newnode)
 
 attributes ()
 
 child_nodes ()
 
 children ()
 
 unlink_node ($aDomNode="")
 
 clone_node ($deep=false)
 
 first_child ()
 
 get_content ()
 
 has_attributes ()
 
 has_child_nodes ()
 
 insert_before ($newnode, $refnode)
 
 last_child ()
 
 next_sibling ()
 
 node_name ($a_local=false)
 
 node_type ()
 
 node_value ()
 
 parent_node ()
 
 previous_sibling ()
 
 remove_child ($oldchild)
 
 replace_child ($oldnode, $newnode)
 
 set_content ($text)
 
 php4DOMNode ($aDomNode)
 
 append_child ($newnode)
 
 replace_node ($newnode)
 
 append_sibling ($newnode)
 
 attributes ()
 
 child_nodes ()
 
 children ()
 
 unlink_node ($aDomNode="")
 
 clone_node ($deep=false)
 
 first_child ()
 
 get_content ()
 
 has_attributes ()
 
 has_child_nodes ()
 
 insert_before ($newnode, $refnode)
 
 last_child ()
 
 next_sibling ()
 
 node_name ()
 
 node_type ()
 
 node_value ()
 
 parent_node ()
 
 previous_sibling ()
 
 remove_child ($oldchild)
 
 replace_child ($oldnode, $newnode)
 
 set_content ($text)
 

Additional Inherited Members

- Data Fields inherited from php4DOMNode
 $myDOMNode
 

Detailed Description

php4DomElement

Definition at line 249 of file inc.xml5compliance.php.

Member Function Documentation

◆ get_attribute() [1/2]

php4DOMElement::get_attribute (   $name)

Definition at line 198 of file inc.xml5compliance.php.

References $name.

199  {
200  return $this->myDOMNode->getAttribute($name);
201  }
if($format !==null) $name
Definition: metadata.php:146

◆ get_attribute() [2/2]

php4DOMElement::get_attribute (   $name)

Definition at line 251 of file inc.xml5compliance.php.

References $name.

252  {
253  return $this->myDOMNode->getAttribute($name);
254  }
if($format !==null) $name
Definition: metadata.php:146

◆ get_content() [1/2]

php4DOMElement::get_content ( )

Definition at line 256 of file inc.xml5compliance.php.

257  {
258  $text_node =&$this->myDOMNode->firstChild;
259 
260  if (is_object($text_node)) {
261  return $text_node->textContent;
262  } else {
263  return "";
264  }
265  }

◆ get_content() [2/2]

php4DOMElement::get_content ( )

Definition at line 314 of file inc.xml5compliance.php.

315  {
316  $text_node = $this->myDOMNode->firstChild;
317 
318  if (is_object($text_node)) {
319  return $text_node->textContent;
320  } else {
321  return "";
322  }
323  }

◆ get_elements_by_tagname() [1/2]

php4DOMElement::get_elements_by_tagname (   $name)

Definition at line 203 of file inc.xml5compliance.php.

References $i, $name, and array.

204  {
205  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
206  $nodeSet=array();
207  $i=0;
208  while ($node=$myDOMNodeList->item($i)) {
209  $nodeSet[]=new php4DOMElement($node);
210  $i++;
211  }
212 
213  return $nodeSet;
214  }
if($format !==null) $name
Definition: metadata.php:146
php4DomElement
Create styles array
The data for the language used.
$i
Definition: disco.tpl.php:19

◆ get_elements_by_tagname() [2/2]

php4DOMElement::get_elements_by_tagname (   $name)

Definition at line 261 of file inc.xml5compliance.php.

References $i, $name, and array.

262  {
263  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
264  $nodeSet=array();
265  $i=0;
266  while ($node=$myDOMNodeList->item($i)) {
267  $nodeSet[]=new php4DOMElement($node);
268  $i++;
269  }
270 
271  return $nodeSet;
272  }
if($format !==null) $name
Definition: metadata.php:146
php4DomElement
Create styles array
The data for the language used.
$i
Definition: disco.tpl.php:19

◆ has_attribute() [1/2]

php4DOMElement::has_attribute (   $name)

Definition at line 216 of file inc.xml5compliance.php.

References $name.

217  {
218  return $this->myDOMNode->hasAttribute($name);
219  }
if($format !==null) $name
Definition: metadata.php:146

◆ has_attribute() [2/2]

php4DOMElement::has_attribute (   $name)

Definition at line 274 of file inc.xml5compliance.php.

References $name.

275  {
276  return $this->myDOMNode->hasAttribute($name);
277  }
if($format !==null) $name
Definition: metadata.php:146

◆ owner_document()

php4DOMElement::owner_document ( )

Definition at line 256 of file inc.xml5compliance.php.

257  {
258  return new php4DOMDocument($this->myDOMNode->ownerDocument);
259  }

◆ remove_attribute() [1/2]

php4DOMElement::remove_attribute (   $name)

Definition at line 221 of file inc.xml5compliance.php.

References $name.

222  {
223  return $this->myDOMNode->removeAttribute($name);
224  }
if($format !==null) $name
Definition: metadata.php:146

◆ remove_attribute() [2/2]

php4DOMElement::remove_attribute (   $name)

Definition at line 279 of file inc.xml5compliance.php.

References $name.

280  {
281  return $this->myDOMNode->removeAttribute($name);
282  }
if($format !==null) $name
Definition: metadata.php:146

◆ set_attribute() [1/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

Definition at line 226 of file inc.xml5compliance.php.

References $name.

227  {
228  return $this->myDOMNode->setAttribute($name, $value);
229  }
if($format !==null) $name
Definition: metadata.php:146

◆ set_attribute() [2/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

Definition at line 284 of file inc.xml5compliance.php.

References $name.

285  {
286  return $this->myDOMNode->setAttribute($name, $value);
287  }
if($format !==null) $name
Definition: metadata.php:146

◆ set_content() [1/2]

php4DOMElement::set_content (   $text)

Definition at line 237 of file inc.xml5compliance.php.

References $text.

238  {
239  // the following replace has been added to conform with PHP4.
240  // A set_content("&") brought a get_content() = "&" there,
241  // whereas PHP5 gives a get_content() = "&"
242  $text = str_replace("&lt;", "<", $text);
243  $text = str_replace("&gt;", ">", $text);
244  $text = str_replace("&amp;", "&", $text);
245 
246  $text_node = new DOMText();
247  $text_node->appendData($text);
248  if (is_object($this->myDOMNode->firstChild)) {
249  $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
250  } else {
251  $this->myDOMNode->appendChild($text_node);
252  }
253  }
$text
Definition: errorreport.php:18

◆ set_content() [2/2]

php4DOMElement::set_content (   $text)

Definition at line 295 of file inc.xml5compliance.php.

References $text.

296  {
297  // the following replace has been added to conform with PHP4.
298  // A set_content("&amp;") brought a get_content() = "&" there,
299  // whereas PHP5 gives a get_content() = "&amp;"
300  $text = str_replace("&lt;", "<", $text);
301  $text = str_replace("&gt;", ">", $text);
302  $text = str_replace("&amp;", "&", $text);
303 
304  $text_node = new DOMText();
305  $text_node->appendData($text);
306  if (is_object($this->myDOMNode->firstChild)) {
307  $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
308  } else {
309  $this->myDOMNode->appendChild($text_node);
310  }
311  }
$text
Definition: errorreport.php:18

◆ tagname() [1/2]

php4DOMElement::tagname ( )

Definition at line 231 of file inc.xml5compliance.php.

232  {
233  return $this->myDOMNode->tagName;
234  }

◆ tagname() [2/2]

php4DOMElement::tagname ( )

Definition at line 289 of file inc.xml5compliance.php.

290  {
291  return $this->myDOMNode->tagName;
292  }

◆ unlink() [1/2]

php4DOMElement::unlink (   $aDomNode)

Definition at line 268 of file inc.xml5compliance.php.

References php4DOMNode\$myDOMNode.

269  {
270  parent::unlink_node($aDomNode);
271  }

◆ unlink() [2/2]

php4DOMElement::unlink (   $aDomNode)

Definition at line 326 of file inc.xml5compliance.php.

327  {
328  parent::unlink_node($aDomNode);
329  }

The documentation for this class was generated from the following file: