On Mon, 20 Aug 2001, Colin Viebrock wrote:

> FWIW, I've needed to hack my code to handle three differences between
> the 2 different API versions.  To be honest, I can't keep track of
> which API was in which release of PHP, so I'll just call them API A)
> and API B).
> 1) Names of tags:
>     API A) $node->name
>     API B) $node->tagname
> 2) Tag attribute value:
>     API A) $node->children[0]->content
>     API B) $node->value
> 3) Is a node a text node:
>     API A) $node->type == XML_TEXT_NODE
>     API B) strtolower(get_class($node)) == 'domtext'

i have one more :)

content of a node

API A) $node->content
API B) $node->children()->content (that does not work this way, but you
get the idea...)

> I haven't installed libxml 2.4.2 and PHP 4.0.7rc1 yet, but I'm
> wondering if someone can tell me which API version is in use?  This
> script should tell you:

it's API B) as far as i know


nam...christian stocker    adr...bremgartnerstr. 66, ch-8003 zurich
pho...+41  1 451 6021      www...http://phant.ch/chregu
mob...+41 76 561 8860      [EMAIL PROTECTED]

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to