should be 

if (flags & (flags & XML_Format|XML_NewlinesOnly))