add domDocument properties for parsing options:
validateOnParse, resolveExternals, preserveWhiteSpace, substituteEntities
implement custom parsing to avoid use of globals
implement local errors while parsing
errors displayed until error objects implemented
add domimplementation->hasFeature()
add formatOutput property (extends DOM)
call xmlFreeDoc when doc is no longer referenced rather than custom code
save and savexml now format based on formatOutput property