Jez Higgins

Freelance software generalist
software created
extended or repaired


Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About

Tuesday 30 August 2005 Arabica: DOM/Text node fixes

Terris Linenbach wrote:
> Creating Text from a Node:

>     explicit Text(const Node& rhs) :
        CharacterData(rhs)
>     {
>       if(dynamic_cast*>(rhs.impl()) == 0)
>         throw std::bad_cast("Cannot cast Node to Text");
>     } // Text

> c:\\source\\arabica\\src\\DOM\\Text.h(26) : error C2039: 'impl' : is not a
> member of 'DOM::Node'

> By the way, instead of requiring dynamic_cast you could use getNodeType() ..

... which is what I've done elsewhere. I have no idea why this didn't get fixed back then - probably because I didn't have tests for it. Now I do :)

Fixes committed DOM/Text.h r1.2, DOM/CharacterData.h r1.2 and DOM/Simple/CharacterDataImpl.h r1.5. Possibly more to follow.


Tagged code, arabica, xml, and c++


Jez Higgins

Freelance software generalist
software created
extended or repaired

Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About