Re: [PATCH] ext. dom php_dom.c
| From: | John Huntjens | Date: | Fri, 11 Jul 2003 12:03:49 +0000 |
| Subject: | Re: [PATCH] ext. dom php_dom.c | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3363@lists.php.net to get a copy of this message | ||
<snip>
> 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.
Thanks Rob,
I got the latest snap from http://snaps.php.net/ , version
php5-200307111130.tar.tar, but that one wil not compile document.c
/sys/tmp/php5-200307111130/ext/dom/document.c: In function
`php_dom_ctx_error':
/sys/tmp/php5-200307111130/ext/dom/document.c:120: parse error before
`parser'
/sys/tmp/php5-200307111130/ext/dom/document.c:122: `parser' undeclared
(first use in this function)
/sys/tmp/php5-200307111130/ext/dom/document.c:122: (Each undeclared
identifier is reported only once
/sys/tmp/php5-200307111130/ext/dom/document.c:122: for each function it
appears in.)
make: *** [ext/dom/document.lo] Error 1
Do I have the wrong snap?
John