Home > Contents > Index >
XMLFILTER
Invokes XML processing for content filtering and tag remapping.
Syntax
<XMLFILTER [FILTERFILE="FILTERFILE_NAME"] [FILTERSTR="FILTER_STRING"] [OUTFILE="OUTFILE_NAME"] [FILE="FILE_NAME"] [STR="STRING_NAME"] VERIFY="VERIFY_VAL" [RUN="RUN_VAL"] [RUNOUT="RUNOUT_VAL"]/>Parameters
FILTERFILE (optional)
- File defining the tag syntax. For example, a tag <Arial></Arial> whose definition is <"Font face=Arial"></Font>.
FILTERSTR (optional)
- Name of the string whose content defines the syntax in
FILTERFILE
.
OUTFILE (optional)
- Name of the file to contain results of filtered XML tags found in
FILE_NAME
orSTRING_NAME
.
FILE (optional)
- Source file containing XML-tagged content. If the file is empty (not null), Sites creates a default file.
STR (optional)
- Source string containing XML-tagged content. If the string is empty (not null), Sites creates a default string.
VERIFY (required)
- Indicates
FILE_NAME
is verified against the filter (syntax checked). Legal values aretrue
orfalse
.
RUN (optional)
- Indicates whether to process the content of
OUTFILE_NAME
for Sites tags. Legal values aretrue
orfalse
.
- If value is
true
and results are not saved to file, the result from the filter is expected to be well-formed XML. The required XML header/footer to specify the FutureTense DTD is prepended/appended before processing.
- Otherwise, the file is saved to disk. If the users specifies XML as the file extension, that user must know how to mark an element properly.
RUNOUT (optional)
- If
RUN
is set to true, this variable's value is set to the evaluated stream instead of writing to the file specified byOUTFILE
.
Error Numbers
The possible values of
errno
include:
Value Description -401 No input. -402 No filter definitions. -403 Parsing failed. -404 Write file failed. -405 Bad file. -406 Bad parameters -407 Document failed. -408 Syntax error occurred during parse.Example
This example constructs a temporary name for filtered output. Because
RUN=true
in the example, the results of the filtered file are then "evaluated" as if they were an element. The content of the resulting file is inserted and then the file is deleted.NewsDir
is a list constructed by querying the SystemInfo table for information about theNews
table.
<SETVAR
NAME="tblname" VALUE="News" /> <SELECTTO
FROM="SystemInfo" WHAT="defdir" LIST="NewsDir" WHERE="tblname" /> <SETVAR
NAME="XMLOutFile" VALUE="CS.Property.cs.xmlfolder/CS.UniqueID.xml"/> <SETVAR
NAME="errno" VALUE="0" /> <XMLFILTER FILTERFILE="NewsDir.defdir/NewsStoryFilter.xml" OUTFILE="Variables.XMLOutFile" FILE="NewsDir.defdir/Stories.urlBody" RUN="true"/> <IF COND="IsError.Variables.errno"> <THEN> <!--Handle error.--> </THEN> <ELSE> <INSERT
FILE="Variables.XMLOutFile"/> <DELETEFILE
FILE="Variables.XMLOutFile"/> </ELSE> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.