is extending DOMElements pointless?

[email protected] (Oliver Müller) Sun, 08 Oct 2006 10:46:01 +0200
Newsgroups php.xml.dev
Message-ID <[email protected]>
Dear developers,


can it be that implementing derived DOMElements is completely useless?

You can't write to them if they are created via 'new myDOMElement', and 
you can't get a version of your own class via 
'myDOMDocument->createElement()'...

I want to have different myDOMElements representing objects in a tree, 
which benefit from the native DOM functionality and add methods like 
'myDOMElement->loadChildrenFromDB()'. Currently, i am forced to use a 
somehow crappy implementation where myDOMElements are not derived and 
store the real DOMElement as a member, which has numerous drawbacks. :-|

So here are my questions:
- Is there a way to make myDOMElement writable?
- can you (kind of) typecast a native DOMElement to a myDOMElement with 
tricks?
- am i missing something?
- any ideas?


Regards, Oliver