Re[2]: source encoding (was: Some suggestions for documentation)
Brought to you by:
bs_php,
nigelswinson
From: Sam B. <bs...@us...> - 2002-06-05 07:54:55
|
> ?: > As default, exportAsXml keeps it, whereas > exportToFile drops it. Is not the main difference between these 2 > functions that exportToFile, er, well, writes the xml to a file? > Nigel: > Well you could pass in the third argument as NULL and that would prevent > it from overwriting the PI. I'm not sure why it's the way it is. Perhaps Sam > has a comment? If not then perhaps we should only add the "default" PI if > none is present. Hi, This is a leftover 'feature' from V1 of Php.XPath. V1 used to ignor the header, so the idea was to replace it by <?xml version="1.0"?> by default when exporting to a file. Then in V2 the user had the option to overwrite it and in V3 we're able to keep the header 'as is' but exportToFile() would still overwite it by default. We could change the behaver but it could break ppls code. -- Sam Blum <bs...@us...> =========================== For the most recent version of PHP.XPath and an archive of this list visit: http://sourceforge.net/projects/phpxpath |