private bool ValidateXmlData(string xml) { Stream stream = null; try { isErrorOccurs = false; XmlDocument xmlDocument = new XmlDocument(); stream = TempFileManager.GetResourceFileStreamByName("CustomFilterValidator.xsd"); if (stream != null) { XmlReader schemaDocument = XmlReader.Create(stream); xmlDocument.LoadXml(xml); xmlDocument.Schemas.Add(string.Empty, schemaDocument); xmlDocument.Validate(InternalValidationHandler); if (isErrorOccurs) { return(false); } return(true); } return(false); } catch (XmlException) { return(false); } finally { isErrorOccurs = false; Utilities.CloseStreamWithoutException(stream, isFlushStream: false); } }
protected ExpandablePart() { InitializeComponent(); plusImage = TempFileManager.GetImageFromEmbededResources(Images.PlusIcon); minusImage = TempFileManager.GetImageFromEmbededResources(Images.MinusIcon); DoubleBuffered = true; }