Jez Higgins

Freelance software grandad
software created
extended or repaired


Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed

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 grandad
software created
extended or repaired

Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed