Move code about nXML mode