Better would be

    if (srcFormat.isXml())

where 
srcFormat.isXml() returned true if rowTag wasn't NULL