Variant c_SimpleXMLElementIterator::t_current() {
  if (m_iter1 == nullptr) return uninit_null();
  if (m_parent->m_is_attribute) {
    return m_iter1->second();
  }

  ArrayIter *iter = m_iter2;
  if (iter == nullptr && m_iter1->second().isObject()) {
    iter = m_iter1;
  }

  if (iter) {
    return iter->second();
  }

  assert(false);
  return uninit_null();
}
Variant c_SimpleXMLElementIterator::t_current() {
  if (m_iter1 == nullptr) return uninit_null();
  if (m_parent->m_is_attribute) {
    return m_iter1->second();
  }

  ArrayIter *iter = m_iter2;
  if (iter == nullptr && m_iter1->second().isObject()) {
    iter = m_iter1;
  }

  if (iter) {
    return iter->second();
  }

  assert(false);
  return uninit_null();
}