'How do you create dynamic forms using XML and angular?

I like to use an to generate XML file that dropdown, buttons and I'm not sure what to do. I'm very new to angular so this is a challenge but I've imported the XML file to the system and now I'm having difficulty going through the XML and generating the controls and displaying the info.

Example of XML

{
    "pageControls": [
        {
            "controlType": "dropdown",
            "controlCaption": "Get email?",
            "selectedValue": "default",
            "options": [
                {
                    "display": "default",
                    "value": "def"
                }, {
                    "display": "other",
                    "value": "oth"
                }
            ]
        }, {
            "controlType": "button",
            "controlAction": "save",
            "buttonText": "save",
            "buttonIcon": ""
        }
    ],
}


Solution 1:[1]

You can use reactive forms to build dynamic Forms. You can create the data from whatever source data you have. XML or JSON.

Kindly check the below link for reference

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Runesh