ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<xmlDocument variable>.ValidDocument (Function)
In french: <Variable xmlDocument>.DocumentValide
Validates an XML document from an XSD schema.
Example
// Validation à partir du schéma défini lors de la déclaration
cMonDoc is xmlDocument, description = "schemaXSDDuProjet"
IF cMonDoc.DocumentValide() = False THEN
	Error(ErrorInfo())
ELSE
	Info("Le document XML est valide") 
END
// Validation avec le schéma passé en paramètre
cMonDoc2 is xmlDocument
IF cMonDoc2.ValidDocument("schemaXSDDuProjet") = False THEN
	Error(ErrorInfo())
ELSE
	Info("Le document XML est valide") 
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 the 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 indicated at declaration time is used (declaration using the syntax: cMonDoc is an xmlDocument, description="monXSD").
  • A WLanguage error is displayed if the schema specified during the declaration is not valid.
Note: If the XML document has been declared with an XSD schema description, validation is performed automatically at save time using the <xmlDocument variable>.Save function.
Component: wd300xml.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help