Re: zend api question
| From: | Uwe Steinmann | Date: | Tue, 10 Aug 1999 14:00:18 +0000 |
| Subject: | Re: zend api question | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9718@lists.php.net to get a copy of this message | ||
On Tue, Aug 10, 1999 at 03:43:49PM +0200, Thies C. Arntzen wrote:
> hi uwe,
>
> - to the best of my knowledge -
> array_init() and object_init_ex() won't touch the refcount stuff (which is
> not needed for array_init(return_value)).
>
> to create a *new* zval use MAKE_STD_ZVAL/INIT_PZVAL those function will do
> the desired.
>
> so just say:
>
> zval *child;
> MAKE_STD_ZVAL(child);
> ...
Ok, thanks.
> PS: i've been thinking of a DOM like thing myself - and i was considering
> using libwww instead of pure expat (to be able to parse HTML and XML) -
> what do you think?
I decided to take libxml (http://rufus.w3.org/veillard/) which is also used
in gnome. It already has a DOM Interface in C which might be helpful.
What I'm not sure about is how to make the php interface:
1. parse the xml file and build up a tree of php objects representing
the xml file. This would be basically what libxml does in C. In such
a case libxml actually does more than needed because it builds
the tree, too. Wonder how efficient that would be with zend.
2. take the tree from libxml and just add php function to walk through it.
This is simple but further away from a DOM interface.
Uwe
--
Uwe.Steinmann@fernuni-hagen.de
Tel: +2331 987 4528 Fax: +2331 987 375