Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   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

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, Content Server database table, or XML string. Depending on the type of data you plan to pass, specify one of the following valid types:

INPUTVAL (required)
Input data, which must correspond to the specified INPUTVALTYPE. Input data can take any of the following forms:

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 to XMLUTILS.PARSE, you must initialize some required parameters. Depending on the type of data you are passing in the INPUTVALTYPE parameter (URI, catalog, or XML data), you may need to set some or all of the supplied parameters. If your XML resides in a Content Server database table, you must specify all parameters.

The output of the XMLUTILS.PARSE tag is a variable.

errno

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 Content Server database table, or included as an XML string.

Input XML file represented by a URI:

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 Content Server database table:

This example reads the input XML file from a Content Server 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:

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 >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.