Re: zend api question
| From: | Thies C. Arntzen | Date: | Tue, 10 Aug 1999 14:16:04 +0000 |
| Subject: | Re: zend api question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9719@lists.php.net to get a copy of this message | ||
On Tue, 10 Aug 1999, Uwe Steinmann wrote:
> 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:
i'm not sure if using a second XML parser would do any good in php. i
think i've read that libwww supports DOM (not sure) and libwww uses expat
as their XML parser but also supports parsing of HTML 4.0 (which i believe
is nice). so i think going with libwww might be a good idea.
>
> 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.
good question - i think implementing both options would be nice.
tc
>
> Uwe
> --
> Uwe.Steinmann@fernuni-hagen.de
> Tel: +2331 987 4528 Fax: +2331 987 375
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany