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_NAMEorSTRING_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_NAMEis verified against the filter (syntax checked). Legal values aretrueorfalse.
RUN (optional)- Indicates whether to process the content of
OUTFILE_NAMEfor Sites tags. Legal values aretrueorfalse.
- If value is
trueand 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
RUNis 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
errnoinclude:
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=truein 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.NewsDiris a list constructed by querying the SystemInfo table for information about theNewstable.
<SETVARNAME="tblname" VALUE="News" /> <SELECTTOFROM="SystemInfo" WHAT="defdir" LIST="NewsDir" WHERE="tblname" /> <SETVARNAME="XMLOutFile" VALUE="CS.Property.cs.xmlfolder/CS.UniqueID.xml"/> <SETVARNAME="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> <INSERTFILE="Variables.XMLOutFile"/> <DELETEFILEFILE="Variables.XMLOutFile"/> </ELSE> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.