import lxml.etree as gfg # # # Prost_Left_Hand_MetalHand_Male # Prost_Left_Hand_MetalHand_Female # 2101af26-54b9-455b-abc0-7533ce37f84b # false # false # false # Prosthesis\metal_base # def create_single_xml(): root = gfg.Element("clothingItem") m_MaleModel = gfg.Element("m_MaleModel") m_MaleModel.text = "TEST TEXT FROM SOMETHING" root.append(m_MaleModel) m_FemaleModel = gfg.Element("m_FemaleModel") m_FemaleModel.text = "TEST TEXT FROM SOMETHING FEMALE" root.append(m_FemaleModel) m_GUID = gfg.Element("m_GUID") m_GUID.text = "get guid" root.append(m_GUID) m_Static = gfg.Element("m_Static") m_Static.text = "false" m_AllowRandomTint = gfg.Element("m_AllowRandomTint") m_AllowRandomTint.text = "false" # TODO Defined by the amount of textures that we're gonna pass for x in range(2): textureChoices = gfg.Element("textureChoices") textureChoices.text = "Texture path" tree = gfg.ElementTree(root) with open("Test_Name.xml", "wb") as file: tree.write(file, encoding='utf-8', xml_declaration=True, pretty_print=True ) create_single_xml()