bool c_SimpleXMLElement::ToBool(const ObjectData* obj) noexcept {
  auto thiz = static_cast<const c_SimpleXMLElement*>(obj);
  if (thiz->m_node || thiz->hasDynProps()) {
    if (thiz->m_is_array || thiz->m_is_children ||
       (thiz->m_node->parent &&
        thiz->m_node->parent->type == XML_DOCUMENT_NODE)) {
      return thiz->m_children.toArray().size() > 0 ||
             thiz->m_attributes.toArray().size() > 0;
    }
    return true;
  }
  return false;
}
bool c_SimpleXMLElement::ToBool(const ObjectData* obj) noexcept {
  auto thiz = static_cast<const c_SimpleXMLElement*>(obj);
  if (thiz->m_node || thiz->hasDynProps()) {
    if (thiz->m_is_array || thiz->m_is_children ||
       (thiz->m_node->parent &&
        thiz->m_node->parent->type == XML_DOCUMENT_NODE)) {
      return thiz->m_children.toArray().size() > 0 ||
             thiz->m_attributes.toArray().size() > 0;
    }
    return true;
  }
  return false;
}