|
|
|
|
<xmlDocument variable>.ValidDocument (Function) In french: <Variable xmlDocument>.DocumentValide Validates an XML document from an XSD schema. // Validation from the schema defined during the declaration cMyDoc is xmlDocument, description = "ProjectXSDSchema" IF cMyDoc.ValidDocument() = False THEN Error(ErrorInfo()) ELSE Info("The XML document is valid") END
// Validation with the schema passed in parameter cMyDoc2 is xmlDocument IF cMyDoc2.ValidDocument("XSDSchemaOfProject") = False THEN Error(ErrorInfo()) ELSE Info("The XML document is valid") END
Syntax
<Result> = <XML document>.ValidDocument([<XSDÂ schema>])
<Result>: Boolean - True if the validation is successful,
- False otherwise. If an error occurs, use ErrorInfo for more details on the error.
<XML document>: xmlDocument Name of xmlDocument variable containing the document to validate. <XSD schema>: Optional character string Name of schema that will be used to validate the XML document. - If this parameter is specified, the specified XSD schema is used to validate the document.
- If this parameter is not specified, the schema specified during the declaration is used (declaration using the following syntax: cMyDoc is xmlDocument, description="MyXSD").
- A WLanguage error is displayed if the schema specified during the declaration is not valid.
Remark: If the XML document was declared with a description of XSD schema, the validation is automatically performed during the backup by <xmlDocument variable>.Save.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|