You are here: Re: [PHP] Extending Element class in a dom tree? « PHP « IT news, forums, messages
Re: [PHP] Extending Element class in a dom tree?

Posted by Erik Franz�n on 05/01/05 08:41

Christian Stocker wrote:

>>Does not work, will never work, just forget about it ;)
>
>
> Ok, that was not the really right answer ;) Of course it does work.
> You can even do stuff on that element, if you use the variable, resp.
> reference ($oMyElement) for doing this.
>
> What doesn't work (and I referred to that) is getting this object
> back from the DomDocument, so for example:
> $oDom->documentElement will give you the DomElement back and not your
> new MyElement.
>
> Hope it's a little bit clearer now
> chregu
>
>>chregu
>>

You mean that dom methods for retrieving Elements will only return
objects with the object methods defined in the DomElement class?

Is there any way to extend Elements in the tree with own methods? Or is
the dom structurue only used to handle defined methods?

The method DomDocument::CreateElement() only returns instances of
DomElement so maybee the Dom structure is not meant to be extended
regarding elements?

/Erik

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация