[tDOM] Writing parsed xml document back to a file



I want to write a parsed XML document back to a file.

I have:

set courseFile [tDOM::xmlOpenFile $fileName];
dom parse -channel $courseFile courseDoc;

When using
$courseDoc asXML
all header information including the encoding definition are missing.

Is there something similar to tDOM::xmlOpenFile for saving a file?
And is there some documentation about tDOM::xmlOpenFile?

Thanks
Daniel
.



Relevant Pages