All pastes #241743 Raw Edit

Quelque chose

public text v1 · immutable
·published 2006-11-06 15:54 UTC
rendered paste body
public function removeSkin($skin2remove){
	// conversion from simplexml to DOM
	$convertedXML = dom_import_simplexml($this->xml);
	$convertedXML = $this->dom->importNode($convertedXML, true);
	$convertedXML = $this->dom->appendChild($convertedXML);
	// removing of the selected node
	$toremove = $convertedXML->getElementById($skin2remove);
	$oldnode = $convertedXML->removeChild($toremove);
	// reconversion from DOM to simplexml, and save
	$this->dom->normalize();
	$this->xml = simplexml_import_dom($this->dom); 
	$this->xml->asXml($this->file);
}