Menu

Question about TiXmlHandle.Child()

2006-01-01
2013-05-20
  • twoeyedhuman

    twoeyedhuman - 2006-01-01

    What does TiXmlHandle.Child(const char * value, int index) return if there is no child?  Is it null?

     
    • Ellers

      Ellers - 2006-01-01

      use the source Luke ;)

      TiXmlHandle TiXmlHandle::Child(...) const
      {
        // *pseudocode*
        if (child)
          return TiXmlHandle( child );
        else
          return TiXmlHandle( 0 );
      }

      so you'll always get a valid TiXmlHandle, allowing you to do handle1.child().child().child() even if the first child() call returned TiXmlHandle(0).

       

Log in to post a comment.