GetFilledXForm() public method

Fills given XForm structure with data form given Xml file.
public GetFilledXForm ( string xmlFileName, XForm xsdForm ) : XForm
xmlFileName string Path to Xml file contains data.
xsdForm SemeionModulesDesigner.XmlSchemaParser.XsdModel.XForm XForm to be filled with data from Xml file.
return SemeionModulesDesigner.XmlSchemaParser.XsdModel.XForm
Ejemplo n.º 1
0
        public void CanParseXFormFromXmlFileDocumentumArchivageSettingsXml()
        {
            //asign
            var xmlParser = new XmlParser();
            var xsdParser = new XsdParser();
            var xForm = xsdParser.ParseXsdFile("DocumentumArchivageSettings.xsd");

            //action
            var xFormFromXml = xmlParser.GetFilledXForm("DocumentumArchivageSettings.xml", xForm);

            //assert
            Assert.NotNull(xFormFromXml);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates values in XForm from given Xml file.
        /// </summary>
        /// <param name="fileName">Path to Xml file contains data.</param>
        internal void UpdateFormFromXml(string fileName)
        {
            var xmlParser = new XmlParser();
            var filledXForm = xmlParser.GetFilledXForm(fileName, _xForm);

            if (filledXForm != null)
            {
                _xFormData = filledXForm;
            }

            _controlManager.UpdateVisibleContainers(_xFormData.Root);
            _controlManager.UpdateBindingForVisibleContainer(_xFormData.Root);
        }