Oxygen etching mechanism in carbon-nitrogen (CNx) domelike nanostructures