From: John Huntjens

> When running the test script, in the entitys get not expanded.
> But the standard
>
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-D
> OMConfiguration
> says about this:

DOMConfiguration has not been implemented at the moment as it is level 3
spec, so opted to just extend the specs, at least for now, as it is much
more usable for the user. Concentration has been to at least get things up
to level 2 working while some level 3 functionality has been added.

Grab the latest code from cvs (added yesterday). New properties were added
to the domDocument. (They are all booleans).

validateOnParse - default FALSE (will load and validate against DTD)
resolveExternals - default FALSE (will load the DTD without performaing
validation)
preserveWhiteSpace - default TRUE
substituteEntities - default FALSE

Your code would look like the following:

$dom = new domDocument();
$dom->resolveExternals = TRUE;
$dom->substituteEntities = TRUE;
$dom->load('test.xml');
print $dom->savexml();

Note: these properties have not yet been worked into the save methods yet,
only the load methods.

Also, use of libxml globals i.e. xmlSubstituteEntitiesDefault(1); - very bad
thing especially with multiple extensions using libxml.

Rob



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to