Resolved #22
This commit is contained in:
		| @@ -37,14 +37,16 @@ def xsd(source: str, xsd: str) -> bool: | ||||
|     :type source: str | ||||
|     :param xsd: XSD schema to validate XML against | ||||
|     :type xsd: str | ||||
|     :return: If the validation was successful or not | ||||
|     :rtype: bool | ||||
|     :return: Message saying, if the validation was successful or not | ||||
|     :rtype: str | ||||
|     """ | ||||
|     xml_schema = etree.XMLSchema(etree.XML(xsd)) | ||||
|  | ||||
|     xml = etree.XML(source) | ||||
|  | ||||
|     return xml_schema.validate(xml) | ||||
|     if xml_schema.validate(xml): | ||||
|         return "XML is valid." | ||||
|     else: | ||||
|         return "XML is NOT valid." | ||||
|      | ||||
|      | ||||
| def xslt(source: str, xslt: str) -> str: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user