php and xml config file

hello every one,

do you know some way to update an XML file…from a DOMDocument object ??

i have already loaded XML file into a DOMDocument obj

		/*load config data*/
		$dom_doc = new DOMDocument();
		$result = @$dom_doc->load("config.dat");

now i need to edit the textContent of some of the nods …
but it seems that public string $textContent ; from The DOMNode class]( is read only

i’m aware that i can use the DOMDocument::save]( to save the document however rebuilding the whole document is awful i would rather use basic file IO to write plain text into the XML is easier.

DOMDocument PHP refrence