PARSER is a parser handle type used to hold a parser instance in variables or parameters. The instance must be created using NEWPARSER and released using FREEPARSER. It also serves as a transfer medium between subprograms such as PARSECLOB and GETDOCUMENT. The handle itself is an opaque type.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL-compatible mode.
Note
For V4.4.2, this type is available starting with OceanBase Database V4.4.2 BP2.
Syntax
parser DBMS_XMLPARSER.PARSER;
Parameters
Parameters |
Explanation |
|---|---|
| parser | Parser handle. |
Return value
Parser handle.
Usage instructions
DBMS_XMLPARSER.PARSER is a private type used to declare parser handles in PL variables. It cannot be directly instantiated and must be generated using the NEWPARSER subprogram.
Related subprograms
Subprogram |
Note |
|---|---|
| NEWPARSER | Creates a parser instance. This subroutine requires passing inDBMS_XMLPARSER.PARSERThe parser handle of the specified type is used as the input parameter. |
| PARSECLOB | Parse on the parserCLOB. This subroutine requires the input ofDBMS_XMLPARSER.PARSERParser handles of the type andCLOBThe method takes an XML string as the input parameter. |
| GETDOCUMENT | Gets the DOM document handle. This subroutine requires passing inDBMS_XMLPARSER.PARSERThe parser handle of the specified type is used as the input parameter. |
| FREEPARSER | Releases the parser. This subroutine requires passing inDBMS_XMLPARSER.PARSERParser handle of the specified type is used as the input parameter. |
Examples
This example creates an XML parser instance using the DBMS_XMLPARSER system package and then releases the parser handle:
-- Declare the parser handle variable
DECLARE
p DBMS_XMLPARSER.PARSER;
BEGIN
-- Create a parser instance
p := DBMS_XMLPARSER.NEWPARSER;
-- Release the parser handle.
DBMS_XMLPARSER.FREEPARSER(p);
END;
/
