def encode_children(old_endian)
       # Cycle through all levels of children recursively:
      children.each do |element|
        if element.children?
          element.encode_children(old_endian)
        elsif element.is_a?(Element)
          encode_child(element, old_endian)
        end
      end
    end
def encode_children(old_endian)
       # Cycle through all levels of children recursively:
      children.each do |element|
        if element.children?
          element.encode_children(old_endian)
        elsif element.is_a?(Element)
          encode_child(element, old_endian)
        end
      end
    end
Re-encodes the binary data strings of all child Element instances.
 This also includes all the elements contained in any possible child elements.

 @note This method is only intended for internal library use, but for technical reasons
   (the fact that is called between instances of different classes), can't be made private.
 @param [Boolean] old_endian the previous endianness of the elements/DObject instance (used for decoding values from binary)