1. A method for forming a resistive-switching memory element comprising: forming a metal containing layer; anodizing the metal containing layer at least partially to form a resistive-switching metal oxide; and forming a first electrode over the resistive switching metal oxide.