ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 262 of file inc.xml5compliance.php.

Member Function Documentation

◆ get_attribute() [1/2]

php4DOMElement::get_attribute (   $name)

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

205  {
206  return $this->myDOMNode->getAttribute($name);
207  }

◆ get_attribute() [2/2]

php4DOMElement::get_attribute (   $name)

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

265  {
266  return $this->myDOMNode->getAttribute($name);
267  }

◆ get_content() [1/2]

php4DOMElement::get_content ( )

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

267  {
268  $text_node =& $this->myDOMNode->firstChild;
269 
270  if (is_object($text_node))
271  {
272  return $text_node->textContent;
273  }
274  else
275  {
276  return "";
277  }
278  }

◆ get_content() [2/2]

php4DOMElement::get_content ( )

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

332  {
333  $text_node = $this->myDOMNode->firstChild;
334 
335  if (is_object($text_node))
336  {
337  return $text_node->textContent;
338  }
339  else
340  {
341  return "";
342  }
343  }

◆ get_elements_by_tagname() [1/2]

php4DOMElement::get_elements_by_tagname (   $name)

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

References array.

210  {
211  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
212  $nodeSet=array();
213  $i=0;
214  while ($node=$myDOMNodeList->item($i))
215  {
216  $nodeSet[]=new php4DOMElement($node);
217  $i++;
218  }
219 
220  return $nodeSet;
221  }
php4DomElement
Create styles array
The data for the language used.

◆ get_elements_by_tagname() [2/2]

php4DOMElement::get_elements_by_tagname (   $name)

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

References array.

275  {
276  $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
277  $nodeSet=array();
278  $i=0;
279  while ($node=$myDOMNodeList->item($i))
280  {
281  $nodeSet[]=new php4DOMElement($node);
282  $i++;
283  }
284 
285  return $nodeSet;
286  }
php4DomElement
Create styles array
The data for the language used.

◆ has_attribute() [1/2]

php4DOMElement::has_attribute (   $name)

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

224  {
225  return $this->myDOMNode->hasAttribute($name);
226  }

◆ has_attribute() [2/2]

php4DOMElement::has_attribute (   $name)

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

289  {
290  return $this->myDOMNode->hasAttribute($name);
291  }

◆ owner_document()

php4DOMElement::owner_document ( )

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

270  {
271  return new php4DOMDocument($this->myDOMNode->ownerDocument);
272  }

◆ remove_attribute() [1/2]

php4DOMElement::remove_attribute (   $name)

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

229  {
230  return $this->myDOMNode->removeAttribute($name);
231  }

◆ remove_attribute() [2/2]

php4DOMElement::remove_attribute (   $name)

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

294  {
295  return $this->myDOMNode->removeAttribute($name);
296  }

◆ set_attribute() [1/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

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

234  {
235  return $this->myDOMNode->setAttribute($name,$value);
236  }

◆ set_attribute() [2/2]

php4DOMElement::set_attribute (   $name,
  $value 
)

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

299  {
300  return $this->myDOMNode->setAttribute($name,$value);
301  }

◆ set_content() [1/2]

php4DOMElement::set_content (   $text)

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

References $text.

245  {
246  // the following replace has been added to conform with PHP4.
247  // A set_content("&") brought a get_content() = "&" there,
248  // whereas PHP5 gives a get_content() = "&"
249  $text = str_replace("&lt;", "<", $text);
250  $text = str_replace("&gt;", ">", $text);
251  $text = str_replace("&amp;", "&", $text);
252 
253  $text_node = new DOMText();
254  $text_node->appendData($text);
255  if (is_object($this->myDOMNode->firstChild))
256  {
257  $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
258  }
259  else
260  {
261  $this->myDOMNode->appendChild($text_node);
262  }
263  }
$text

◆ set_content() [2/2]

php4DOMElement::set_content (   $text)

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

References $text.

310  {
311  // the following replace has been added to conform with PHP4.
312  // A set_content("&amp;") brought a get_content() = "&" there,
313  // whereas PHP5 gives a get_content() = "&amp;"
314  $text = str_replace("&lt;", "<", $text);
315  $text = str_replace("&gt;", ">", $text);
316  $text = str_replace("&amp;", "&", $text);
317 
318  $text_node = new DOMText();
319  $text_node->appendData($text);
320  if (is_object($this->myDOMNode->firstChild))
321  {
322  $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
323  }
324  else
325  {
326  $this->myDOMNode->appendChild($text_node);
327  }
328  }
$text

◆ tagname() [1/2]

php4DOMElement::tagname ( )

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

239  {
240  return $this->myDOMNode->tagName;
241  }

◆ tagname() [2/2]

php4DOMElement::tagname ( )

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

304  {
305  return $this->myDOMNode->tagName;
306  }

◆ unlink() [1/2]

php4DOMElement::unlink (   $aDomNode)

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

References php4DOMNode\$myDOMNode.

282  {
283  parent::unlink_node($aDomNode);
284  }

◆ unlink() [2/2]

php4DOMElement::unlink (   $aDomNode)

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

347  {
348  parent::unlink_node($aDomNode);
349  }

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