/// <summary> /// Mandatory fields constructor. /// Use this constructor if you wish to validate the XML document. /// </summary> /// <param name="XMLFile"> Path and filename of the XML file to be loaded.</param> /// <param name="XSDFile"> Path and filename of the XSD file that the XML file will be validated against.</param> /// <param name="Namespace"> Namespace of the XML document collection.</param> public XMLLoader(string XMLFile, string XSDFile, string Namespace) { this.XMLFile = XMLFile; this.XSDFile = XSDFile; this.NameSpace = Namespace; this.p_objValidationResult = new ValidXML(); }
/// <summary> /// Mandatory fields constructor. /// </summary> /// <param name="XMLFile"> Path and filename of the XML file to be validated.</param> /// <param name="XSDFile"> Path and filename of the XSD file that the XML file will be validated against.</param> /// <param name="NameSpace"> Namespace of the XML document collection.</param> public XMLValidator(string XMLFile, string XSDFile, string NameSpace) { this.m_strXMLFile = XMLFile; this.m_strXSDFile = XSDFile; this.m_strNameSpace = NameSpace; this.m_objValidationResult = new ValidXML(); }
/// <summary> /// This metod Validates an XML document via the XMLValidator class. /// </summary> protected void Validate() { XMLValidator validator; try { validator = new XMLValidator(this.p_strXMLFile, this.p_strXSDFile, this.p_strNameSpace); this.p_objValidationResult = validator.Validate(); } catch (Exception ex) { throw ex; } finally { validator = null; } }