Home > Contents > Index >
XMLUTILS.PARSE
Reads data from an input XML file according to specified parameters and returns an XML DOM object. The input file is validated against referenced DTDs, if any.
Syntax
<XMLUTILS.PARSE INPUTVALTYPE="input value type
" INPUTVAL="file location
" COLNAME="url
" COLVAL="file.xml
" OUTPUTVAL="variable name
"/>Parameters
INPUTVALTYPE (required)
- Description of the XML data to be passed in the
INPUTVAL
parameter and parsed. Data can be referenced as either a URI, Sites database table, or XML string. Depending on the type of data you plan to pass, specify one of the following valid types:
uri
Indicates that the input XML is represented by a URI.
catalog
Indicates that the input XML is located in a Sites database table.
data
Indicates that the input XML is actual XML content in string format.
INPUTVAL (required)
- Input data, which must correspond to the specified
INPUTVALTYPE
. Input data can take any of the following forms:
- URI string that conforms to URI syntax and represents the input XML file.
- Name of the Sites database table that contains the input data.
- XML file contents.
OUTPUTVAL (required)
- Name of the variable that contains the resulting DOM object.
COLNAME (required for XML in a database table)
- Name of the column in the database table where the XML file resides. This column must be defined as the csindirect (URL) data type.
COLVAL (required for XML in a database table)
- Value of the column COLNAME for the row in which the XML file resides.
Description
The
XMLUTILS.PARSE
tag includes parameters that specify how input data is read. For each reference toXMLUTILS.PARSE
, you must initialize some required parameters. Depending on the type of data you are passing in theINPUTVALTYPE
parameter (URI, catalog, or XML data), you may need to set some or all of the supplied parameters. If your XML resides in a Sites database table, you must specify all parameters.The output of the
XMLUTILS.PARSE
tag is a variable.Error Numbers
The possible values of
errno
include:
Value Description 0 Success. The XML input was successfully parsed. -100 General exception failure.Examples
The following examples demonstrate syntax and parameters when the input file is referenced as a URI, referenced as a Sites database table, or included as an XML string.
Input XML file represented by a URI:
<XMLUTILS.PARSE INPUTVALTYPE="uri" INPUTVAL= "file:///location/filename.xml" OUTPUTVAL="parsedOutputVar"/>This example accepts the input XML file in the form of a URI and returns a DOM object, which is a DOM representation of the XML referenced by the URI.
Input XML file resides in a Sites database table:
<XMLUTILS.PARSE INPUTVALTYPE="catalog" INPUTVAL= "InboundCatalog" COLNAME="url" COLVAL="filexyz.xml" OUTPUTVAL="parsedOutputVar"/>This example reads the input XML file from a Sites database table and returns a DOM object, which is a structured representation of the XML.
Input XML is a string that contains the contents of the XML File:
<XMLUTILS.PARSE INPUTVALTYPE="data" INPUTVAL= "<?xml version . . . > . . . " OUTPUTVAL="parsedOutputVar"/>Reads the contents of the input XML file in the form of a string and returns an object, which is the DOM representation of the XML supplied in the string.
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.