Re: [PHP-XML-DEV] XMLReader: missing rewind()

[email protected] (Christian Stocker) Thu, 30 Sep 2004 08:38:42 +0200
Newsgroups php.xml.dev
Message-ID <[email protected]>

On 29.9.2004 19:28 Uhr, Vivian Steller wrote:
> I'm missing a function like $reader->rewind() to set the internal cursor of
> the reader to its starting position.
> 
> further i didn't found such rewind() at
> http://xmlsoft.org/html/libxml-xmlreader.html , the home of libxml's
> xmlreader...
> 
> i think the only way getting out is to $reader->close() and
> $reader->XML(...) again??
> 
> Can somebody help me with that?

It's a forward reading XML Parser, therefore there's no rewind (like in 
SAX..). And yes, libxml2 doesn't seem to provide such a function, either.

I don't know, if it's too complicated to add it or just against the 
principle. But as long as libxml2 doesn't provide it, we won't implement it.

Closing/opening shouldn't be an expensive task with XMLReader, anyway.

chregu

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid 0x5CE1DECB