4D v14.3DOM Parse XML variable |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
DOM Parse XML variable
DOM Parse XML variable
The DOM Parse XML variable command parses a BLOB or Text type variable containing an XML structure and returns a reference for this variable. The command can validate (or not) the structure via a DTD or an XML schema (XML Schema Definition (XSD) document). Pass the name of the BLOB or Text variable containing the XML object in the variable parameter. The Boolean parameter validation indicates whether or not to validate the structure.
If you pass True in validation and omit the third parameter, the command attempts to validate the XML structure via a DTD or XSD reference found in the structure itself. Validation can be indirect: if the structure contains a reference to a DTD file that itself contains a reference to an XSD file, the command attempts to carry out both validations. The third parameter indicates a specific DTD or an XML schema for document parsing. If you use this parameter, the command does not take the DTD referred to in the XML document into account. Validation by DTD
Validation by schema If validation cannot be performed (no DTD or XSD, incorrect URL, etc.), an error is generated. The Error system variable indicates the error number. You can intercept this error using a method installed by the ON ERR CALL command. The command returns a character string (ElementRef) making up the reference in the memory of the document virtual structure. This reference should be used with other XML parsing commands. Important: Once you no longer have any need for it, remember to call the DOM CLOSE XML command with this reference in order to free up the memory. Opening an XML object located in a 4D Text variable, without validation: C_TEXT(myTextVar) Opening an XML document located in a 4D BLOB, without validation: C_BLOB(myBlobVar) If the command has been correctly executed, the system variable OK is set to 1. Otherwise, it is set to 0. |
PROPERTIES
Product: 4D
HISTORY
Modified: 4D 2004 SEE ALSO
DOM CLOSE XML ARTICLE USAGE
4D Language Reference ( 4D v11 SQL Release 6) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||