The NEWPARSER function allocates and initializes a new XML parser instance, returning a PARSER handle for use by subsequent subprograms such as PARSECLOB and GETDOCUMENT. It is typically called as the first step in the XML parsing process.
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 subprogram is available starting with OceanBase Database V4.4.2 BP2.
Syntax
DBMS_XMLPARSER.NEWPARSER;
Parameters
Parameters |
Explanation |
|---|---|
| None | None. |
Return value
A newly created parser handle of type DBMS_XMLPARSER.PARSER.
Usage instructions
Each parsing process should call NEWPARSER separately. After use, you must call FREEPARSER to release resources and avoid handle leaks.
Examples
This example creates an XML parser instance using the DBMS_XMLPARSER system package:
-- 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;
/
