Return type:
READ-XML ( source-type , file memptr handle longchar , read-mode, schema-location , override-default-mapping, field-type-mapping , verify-schema-mode )A CHARACTER expression that specifies the source XML document type. Valid values are "FILE", "MEMPTR", "HANDLE", and "LONGCHAR".A CHARACTER expression that specifies the name of a file. You can specify an absolute pathname, a relative pathname (based on the current working directory), or a URL pathname. Valid URL protocols include FILE and HTTP (the HTTPS protocol is not supported). The AVM verifies that the file exists and is accessible The pathname can contain Unicode characters. See OpenEdge Development: Internationalizing Applications for more information about Unicode.A CHARACTER expression that specifies the mode in which the READ-XML( ) method reads data from the XML document into a temp-table or ProDataSet member buffer. The expression must evaluate to "APPEND", "EMPTY", "MERGE", or "REPLACE". The default value is "MERGE".Table 98 lists the READ-XML( ) method modes for reading data.
Table 98: If you specify the empty string ("") or the Unknown value (?), the AVM creates or verifies the object’s schema using any XML Schema defined or referenced in the XML document.If you specify the Unknown value (?), the method uses the default value of FALSE.
"field-name-1,data-type-1 ,field-name-n,data-type-n "A CHARACTER expression that evaluates to the name of the specified field. For a ProDataSet object, you must qualify the field name with the buffer name from the XML Schema. That is, buffer-name.field-name.If you specify the Unknown value (?), the method uses the default data type mapping. For more information about the ABL XML data type mapping rules, see OpenEdge Development: Working with XML.An optional CHARACTER expression that specifies the mode in which the READ-XML( ) method verifies any XML Schema against existing ABL schema. The expression must evaluate to "IGNORE", "LOOSE", or "STRICT". The default value is "LOOSE".Table 99 lists the READ-XML( ) method schema verification modes.
Ignores any XML Schema specified in schema-location, or defined in the XML Document. If you specify the Unknown value (?), the method uses the default value of LOOSE.If the ProDataSet or temp-table object does not have a schema (that is, the object is dynamic and in the CLEAR state), the AVM creates the schema from either the XML Schema file specified in schema-location, or the XML Schema defined or referenced in the XML document. If a dynamic temp-table is not in the PREPARED or CLEAR state, the method generates an error and returns FALSE.If the ProDataSet or temp-table object already has a schema (that is, the object is static, or the temp-tables are in the PREPARED state), the AVM verifies any XML Schema specified by schema-location, or defined or referenced in the XML document, against the object’s schema, unless the verify-schema-mode is "IGNORE".If the AVM cannot identify any XML Schema for the ProDataSet or temp-table object, (that is, schema-location is the empty string ("") or the Unknown value (?) and the XML document does not define or reference a schema, the AVM infers the schema from the data in the XML document.For more information about creating schema from XML Schema, verifying XML Schema, or inferring schema from XML document text, see OpenEdge Development: Working with XML.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |