Arabica: DOM/Text node fixes

Terris Linenbach wrote:

Creating Text from a Node:

explicit Text(const Node<stringT>& rhs) : CharacterData<stringT>(rhs) {
  if(dynamic_cast<Text_impl<stringT>*>(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<node_string_type>'

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

This 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.


Tagged code, arabica, xml, and c++


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired



Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired


Jez Higgins

Freelance software grandad
software created
extended or repaired