XML_Load_XSD_Grammar
%XML_Load_XSD_Grammar function
Function
The function loads a definition of an XSD document from a file system.
Declaration
INT %XML_Load_XSD_Grammar(
TEXT in fileName,
TEXT in features
)Parameters
fileName | Path to an XSD document on a disk. |
features | Optional parameter of the Text type that enables to change predefined values of some parameters of default SAX Parsera and thus influence its behaving and then the contents of loaded document in the memory. |
Return value
Handle to open XSD grammar. If XSD document fails to open or is damaged, the return value will be invalid.
Description
The function loads a definition of XSD document from a file system. On its basis there is created the proper XSD grammar. It is used for next work with the help of a handle, which is returned as a return value of function.
If the function returns an invalid result, you may find out the information about error by calling the function %XML_GetLastErrorMessage. After finishing the work with grammar, it must be released from the memory by calling the function %XML_FreeGrammar.
Example
INT _grammar
BOOL _bFree
_grammar := %XML_Load_XSD_Grammar(_FILE_REF_XSD,"")
.
.
.
_bFree := %XML_FreeGrammar(_grammar)