Previous Page | Next Page

XMLMap Files for the XML Engine

XMLMap Syntax Version 1.9


Using XMLMap Syntax

The XML elements for the XMLMap syntax for version 1.9 are explained in this chapter. The elements are listed in the order in which you would typically include them in an XMLMap. That is:

CAUTION:
The XMLMap markup, as XML itself, is case sensitive.

The tag names must be uppercase, and the element attributes must be lowercase. An example is <SXLEMAP version="1.9">. In addition, the supported XPath syntax is case sensitive as well.  [cautionend]


Elements for XMLMap

SXLEMAP version="number" name="XMLMap" description="description"

is the primary (root) enclosing element that contains the definition for the generated output file. The element provides the XML well-formed constraint for the definition.

Restriction: When importing an XML document, the definition can define more than one output SAS data set. When exporting an XML document from a SAS data set, the definition can define only one output XML document.
Requirement: The SXLEMAP element is required.

version="number"

specifies the version of the XMLMap syntax. The documented XMLMap syntax version is 1.9 and must be specified to obtain full functionality.

Default: The default version is the first version of XMLMap syntax. It is retained for compatibility with prior releases of the XMLMap syntax. It is recommended that you update existing XMLMaps to version 1.9.
Restriction: The XML92 engine nickname does not support XMLMap syntax before version 1.2. If the version is 1.0 or 1.1, an error occurs.
Tip: To update an XMLMap to version 1.9, load the existing XMLMap into SAS XML Mapper, change the version to 1.9 on the XMLMap Settings tab, and then save the XMLMap. For information about SAS XML Mapper, see Using SAS XML Mapper to Generate and Update an XMLMap.
name="XMLMap"

is an optional attribute that specifies the filename of the XMLMap.

description="description"

is an optional attribute that specifies a description of the XMLMap.

In the example below, the SXLEMAP element specifies all three attributes and contains two TABLE elements.

<?xml version="1.0" ?>
<SXLEMAP version="1.9" name="Myxmlmap" 
         description="sample XMLMap">
    <TABLE name="test1">
       .
       .
       .
    </TABLE>
    <TABLE name="test2"> 
       .
       .
       .
    </TABLE>
    </SXLEMAP>  

Elements for Exporting

OUTPUT XML92 Only

is an optional element that contains one or more HEADING elements and one TABLEREF element for exporting a SAS data set as an XML document.

Requirement: If you specify version 1.9 in an XMLMap to export a SAS data set as an XML document, you must include the OUTPUT element in the XMLMap.
Featured in: Using an XMLMap to Export an XML Document with a Hierarchical Structure
HEADING XML92 Only

is an optional element that contains one or more ATTRIBUTE elements.

Featured in: Using an XMLMap to Export an XML Document with a Hierarchical Structure
ATTRIBUTE name="name" value="value" XML92 Only

is an optional element that contains additional file attribute information for the exported XML document, such as a schema reference, XML namespace, or other general attributes. The specified name-value pairs are added as attributes to the first generated element in the exported XML document, such as, <NHL description="Teams of the National Hockey League">.

Featured in: Using an XMLMap to Export an XML Document with a Hierarchical Structure

name="name"

specifies a name for a file attribute, such as name="description".

value="value"

specifies a value for the attribute, such as value="Teams of the National Hockey League".

TABLEREF name="name" XML92 Only

is an optional element that specifies the name of the table in the XMLMap to be exported.

Restriction: You can specify one TABLEREF element only.
Requirement: The specified name must match a TABLE element name= attribute.
Featured in: Using an XMLMap to Export an XML Document with a Hierarchical Structure

name="name"

specifies the name of the table in the XMLMap to be exported. The name must be unique in the XMLMap definition, and the name must be a valid SAS name, which can be up to 32 characters.


Elements for Tables

TABLE name="data-set-name"

is an element that contains a data set definition.

<TABLE name="channel">
Requirement: The TABLE element is required.
Interaction: The TABLE element can contain one or more of the following elements: TABLE-PATH, TABLE-END-PATH, TABLE-DESCRIPTION, and COLUMN.

name="data-set-name"

specifies the name for the SAS data set. The name must be unique in the XMLMap, and the name must be a valid SAS name, which can be up to 32 characters.

Requirement: The name= attribute is required.
TABLE-PATH syntax="type"

specifies a location path that tells the XML engine where in the XML document to locate and access specific elements in order to collect variables for the SAS data set. The location path defines the repeating element instances in the XML document, which is the SAS data set observation boundary. The observation boundary is translated into a collection of rows with a constant set of columns.

Requirement: The TABLE-PATH element is required.

syntax="type"

is an optional attribute that specifies the type of syntax in the location path. The syntax is valid XPath construction in compliance with the W3C specifications.

Default: The default is XPATH, that is, syntax="XPATH".
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. Note that XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase. All location paths must begin with the root-enclosing element (denoted by a slash '/') or with the "any parent" variant (denoted by double slashes '//'). Other W3C documented forms are not currently supported.

For example, using the XML document RSS.XML, which is used in the example Using an XMLMap to Import an XML Document as Multiple SAS Data Sets, this TABLE-PATH element causes the following to occur:

<TABLE-PATH syntax="XPATH"> /rss/channel/item </TABLE-PATH>
  1. The XML engine reads the XML markup until it encounters the <ITEM> start tag.

  2. The XML engine clears the input buffer, sets the contents to MISSING (by default), and scans elements for variable names based on the COLUMN element definitions. As values are encountered, they are read into the input buffer. (Note that whether the XML engine resets to MISSING is determined by the DEFAULT element as well as the COLUMN element retain= attribute.)

  3. When the </ITEM> end tag is encountered, the XML engine writes the completed input buffer to the SAS data set as a SAS observation.

  4. The process is repeated for each <ITEM> start-tag and </ITEM> end-tag sequence until the end-of-file is encountered in the input stream or until the TABLE-END-PATH (if specified) is achieved, which results in six observations.

CAUTION:
Specifying the table location path, which is the observation boundary, can be tricky due to start-tag and end-tag pairing.

The table location path determines which end tag causes the XML engine to write the completed input buffer to the SAS data set. If you do not identify the appropriate end tag, the result could be concatenated data instead of separate observations, or an unexpected set of columns. For examples, see Determining the Observation Boundary to Avoid Concatenated Data and Determining the Observation Boundary to Select the Best Columns.  [cautionend]

TABLE-END-PATH syntax="type" beginend="BEGIN|END"

is an optional, optimization element that saves resources by stopping the processing of the XML document before the end of file. The location path tells the XML engine where in the XML document to locate and access a specific element in order to stop processing the XML document.

Default: Processing continues until the last end tag in the XML document.
Interaction: The TABLE-END-PATH element does not affect the observation boundary; that is determined with the TABLE-PATH element.
Tip: Specifying a location to stop processing is useful for an XML document that is hierarchical, but generally not appropriate for repeating instance data.
Featured in: Using an XMLMap to Import an XML Document as Multiple SAS Data Sets

syntax="type"

is an optional attribute that specifies the type of syntax in the location path. The syntax is valid XPath construction in compliance with the W3C specifications. The XPath form supported by the XML engine allows elements and attributes to be individually selected for exclusion in the generated SAS data set.

Default: The default is XPath, that is, syntax="XPATH".
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. Note that XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase. All location paths must begin with the root-enclosing element (denoted by a slash '/') or with the "any parent" variant (denoted by double slashes '//'). Other W3C documented forms are not currently supported.
Featured in: Using an XMLMap to Import an XML Document as Multiple SAS Data Sets
beginend="BEGIN|END"

is an optional attribute that specifies to stop processing when either the element start tag is encountered or the element end tag is encountered.

Default: BEGIN

For example, using the XML document RSS.XML, which is used in the example Using an XMLMap to Import an XML Document as Multiple SAS Data Sets, there is only one <CHANNEL> start-tag and one </CHANNEL> end-tag. With the TABLE-PATH location path,

<TABLE-PATH syntax="XPATH"> /rss/channel </TABLE-PATH>
the XML engine would process the entire XML document, even though it does not store new data in the input buffer after it encounters the first <ITEM> start tag, because the remaining elements no longer qualify. The following TABLE-END-PATH location path tells the XML engine to stop processing when the <ITEM> start tag is encountered:
<TABLE-END-PATH syntax="XPATH" beginend="BEGIN"> 
   /rss/channel/item </TABLE-END-PATH>
Therefore, with the two location path specifications, the XML engine processes only the highlighted data in the RSS.XML document for the CHANNEL data set, rather than the entire XML document:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="0.91">
   <channel>
      <title>WriteTheWeb</title>
      <link>http://writetheweb.com</link>
      <description>News for web users that write back
         </description>
      <language>en-us</language>
      <copyright>Copyright 2000, WriteTheWeb team.
         </copyright>
      <managingEditor>editor@writetheweb.com
         </managingEditor>
      <webMaster>webmaster@writetheweb.com</webMaster>
      <image>
         <title>WriteTheWeb</title>
         <url>http://writetheweb.com/images/mynetscape88.gif
            </url>
         <link>http://writetheweb.com</link>
         <width>88</width>
         <height>31</height>
         <description>News for web users that write back
            </description>
         </image>
      <item>          
         <title>Giving the world a pluggable Gnutella</title>
 		 <link>http://writetheweb.com/read.php?item=24</link>  		 
      <description>WorldOS is a framework on which to build programs 
          that work like Freenet or Gnutella-allowing distributed 
          applications using  peer-to-peer routing.</description> 
      </item>       
      <item>
         .
         .
         .
   </channel>
</rss>
TABLE-DESCRIPTION

is an optional element that specifies a description for the SAS data set, which can be up to 256 characters. For example,

<TABLE-DESCRIPTION> Data Set contains TV channel 
   information </TABLE-DESCRIPTION>

Elements for Columns

COLUMN name="name" retain="NO|YES" replace="NO|YES" ordinal="NO|YES" class="ORDINAL|FILENAME|FILEPATH"

is an element that contains a variable definition. For example,

<COLUMN name="Title">
Requirement: At least one COLUMN element is required.
Interaction: COLUMN can contain one or more of the following elements that describe the variable attributes: DATATYPE, DEFAULT, ENUM, FORMAT, INFORMAT, DESCRIPTION, LENGTH, TYPE, PATH, INCREMENT-PATH, DECREMENT-PATH, and RESET-PATH.

name="name"

specifies the name for the variable. The name must be a valid SAS name, which can be up to 32 characters.

Requirement: The name= attribute is required.
retain="NO|YES"

is an optional attribute that determines the contents of the input buffer at the beginning of each observation.

NO

sets the value for the beginning of each observation either to MISSING or to the value of the DEFAULT element if specified.

YES

keeps the current value until it is replaced by a new, nonmissing value. Specifying YES is much like the RETAIN statement in DATA step processing. It forces the retention of processed values after an observation is written to the output SAS data set.

Default: NO
Featured in: Importing Hierarchical Data as Related Data Sets
replace="NO|YES"

is an optional attribute that controls the concatenation of data.

NO

concatenates data until the end of the observation boundary.

YES

replaces existing content with new content. Specifying replace="YES" operates like the REPLACE statement in DATA step processing.

Default: NO
Tip: Concatenated data might be the result of an improperly identified end of the observation boundary, which is determined with the TABLE-PATH element.
ordinal="NO|YES"

is an optional attribute that determines whether the variable is a counter variable (similar to the _N_ automatic variable in DATA step processing). A counter variable keeps track of the number of times the location path, which is specified by the INCREMENT-PATH element or the DECREMENT-PATH element, is encountered. The counter variable increments its count by 1 each time the location path is encountered. Counter variables can be useful for identifying individual occurrences of like-named data elements, or for counting observations. The value for the ordinal= attribute determines which column location path to use for tracking the column's values.

Default: NO
Restriction: The ordinal= attribute is deprecated in SAS 9.2. This attribute will not be supported in future releases. This functionality is provided with the class="ORDINAL" attribute.
Requirement: For a counter variable, the TYPE element must specify the SAS data type as numeric, and the DATATYPE element must specify the type of data as integer.

NO

determines that the variable is not a counter variable. The PATH element is required. INCREMENT-PATH, DECREMENT-PATH, and RESET-PATH elements are not allowed.

YES

determines that the variable is a counter variable. Either the INCREMENT-PATH or the DECREMENT-PATH element is required. The RESET-PATH element is optional. The PATH element is not allowed.

class="ORDINAL|FILENAME|FILEPATH" XML92 Only

is an optional attribute that determines the type of variable.

ORDINAL

specifies that the variable is a numeric counter variable that keeps track of the number of times the location path, which is specified by the INCREMENT-PATH element or the DECREMENT-PATH element, is encountered. (This is similar to the _N_ automatic variable in DATA step processing.) The counter variable increments or decrements its count by 1 each time the location path is encountered. Counter variables can be useful for identifying individual occurrences of like-named data elements, or for counting observations.

Restriction: When exporting an XML document, variables with class="ORDINAL" are not included in the output XML document.
Requirement: You must use the INCREMENT-PATH element or the DECREMENT-PATH element. The PATH element is not allowed.
Requirement: The TYPE element must specify the SAS data type as numeric, and the DATATYPE element must specify the type of data as integer.
Tip: Specifying class="ORDINAL" is the same as specifying the COLUMN attribute ordinal="YES".
Featured in: Including a Key Field with Generated Numeric Keys
FILENAME

generates a character variable that contains the filename and extension of the input document. This functionality can be useful when you assign a libref for the XML engine that is associated with a physical location of a SAS library to determine which file contains a particular value.

Requirement: The TYPE element must specify the SAS data type as character, and the DATATYPE element must specify the type of data as string.
FILEPATH

generates a character variable that contains the pathname, filename, and extension of the input document. This functionality can be useful when you assign a libref for the XML engine that is associated with a physical location of a SAS library to determine which file contains a particular observation.

Requirement: The TYPE element must specify the SAS data type as character, and the DATATYPE element must specify the type of data as string.
TYPE

specifies the SAS data type (character or numeric) for the variable, which is how SAS stores the data. For example, the following specifies that the SAS data type for the variable is numeric:

<TYPE> numeric </TYPE>
Requirement: The TYPE element is required.
Tip: To assign a floating-point type, use
<DATATYPE> float </DATATYPE>
<TYPE> numeric </TYPE>
Tip: To apply output formatting in SAS, use the FORMAT element.
Tip: To control data type conversion on input, use the INFORMAT element.
<INFORMAT> datetime </INFORMAT>
DATATYPE

specifies the type of data being read from the XML document for the variable. For example, the following DATATYPE element specifies that the data contains alphanumeric characters:

<DATATYPE> string </DATATYPE>
Restriction: The values for previous versions of XMLMap syntax are not accepted by version 1.9.
Requirement: The DATATYPE element is required.

The type of data specification can be

string

specifies that the data contains alphanumeric characters and does not contain numbers used for calculations.

integer

specifies that the data contains whole numbers used for calculations.

double

specifies that the data contains floating-point numbers.

datetime

specifies that the input represents a valid datetime value, which is either

  • in the form of the XML specification ISO 8601 format. The default form is: yyyy-mm-ddThh:mm:ss[.nnnnnn].

  • in a form for which a SAS informat (either supplied by SAS or user-written) properly translates the input into a valid SAS datetime value. See also the INFORMAT element.

date

specifies that the input represents a valid date value, which is either

  • in the form of the XML specification ISO 8601 format. The default form is: yyyy-mm-dd.

  • in a form for which a SAS informat (either supplied by SAS or user-written) properly translates the input into a valid SAS date value. See also the INFORMAT element.

time

specifies that the input represents a valid time value, which is either

  • in the form of the XML specification ISO 8601 format. The default form is: hh:mm:ss[.nnnnnn].

  • in a form for which a SAS informat (either supplied by SAS or user-written) properly translates the input into a valid SAS date value. See also the INFORMAT element.

DEFAULT

is an optional element that specifies a default value for a missing value for the variable. Use the DEFAULT element to assign a nonmissing value to missing data. For example, by including the following element, the XML engine assigns the value single when a missing value occurs:

<DEFAULT> single </DEFAULT>
Default: By default, the XML engine sets a missing value to MISSING.
Featured in: Determining the Observation Boundary to Select the Best Columns
ENUM

is an optional element that contains a list of valid values for the variable. The ENUM element can contain one or more VALUE elements in order to list the values. By using ENUM, values in the XML document are verified against the list of values. If a value is not valid, it is either set to MISSING (by default) or set to the value specified by the DEFAULT element. Note that a value specified for DEFAULT must be one of the ENUM values in order to be valid.

<COLUMN name="filing_status">
   .
   .
   .
   <DEFAULT> single </DEFAULT>
   .
   .
   .
   <ENUM>
      <VALUE> single </VALUE>
      <VALUE> married filing joint return </VALUE>
      <VALUE> married filing separate return </VALUE>
      <VALUE> head of household </VALUE>
      <VALUE> qualifying widow(er) </VALUE>
   </ENUM>
</COLUMN>
Featured in: Determining the Observation Boundary to Select the Best Columns
FORMAT width="w" ndec="d"

is an optional element that specifies a SAS format for the variable. A format name can be up to 31 characters for a character format and 32 characters for a numeric format. A SAS format is an instruction that SAS uses to write values. You use formats to control the written appearance of values. Do not include a period (.) as part of the format name. Specify a width and length as attributes, not as part of the format name.

For a list of the SAS formats, including the ISO 8601 SAS formats, see SAS Language Reference: Dictionary.

Featured in: Determining the Observation Boundary to Select the Best Columns

width="w"

is an optional attribute that specifies a format width, which for most formats is the number of columns in the output data.

ndec="d"

is an optional attribute that specifies a decimal scaling factor for numeric formats.

Here is an example:

<FORMAT> E8601DA </FORMAT>
<FORMAT width="8"> best </FORMAT>
<FORMAT width="8" ndec="2"> dollar </FORMAT>
INFORMAT width="w" ndec="d"

is an optional element that specifies a SAS informat for the variable. An informat name can be up to 30 characters for a character informat and 31 characters for a numeric informat. A SAS informat is an instruction that SAS uses to read values into a variable, that is, to store the values. Do not include a period (.) as part of the informat name. Specify a width and length as attributes, not as part of the informat name.

For a list of the SAS informats, including the ISO 8601 SAS informats, see SAS Language Reference: Dictionary.

Featured in: Determining the Observation Boundary to Select the Best Columns

width="w"

is an optional attribute that specifies an informat width, which for most informats is the number of columns in the input data.

ndec="d"

is an optional attribute that specifies a decimal scaling factor for numeric informats. SAS divides the input data by 10 to the power of this value.

Here is an example:

<INFORMAT> E8601DA </INFORMAT>
<INFORMAT width="8"> best </INFORMAT>
<INFORMAT width="8" ndec="2"> dollar </INFORMAT>
DESCRIPTION

is an optional element that specifies a description for the variable, which can be up to 256 characters. The following example shows that the description is assigned as the variable label.

<DESCRIPTION> Story link </DESCRIPTION>
LENGTH

is the maximum field storage length from the XML data for a character variable. The value refers to the number of bytes used to store each of the variable's values in the SAS data set. The value can be 1 to 32,767. During the input process, a maximum length of characters is read from the XML document and transferred to the observation buffer. For example,

<LENGTH> 200 </LENGTH>
Restriction: LENGTH is not valid for numeric data.
Requirement: For data that is defined as a STRING data type, the LENGTH element is required.
Tip: You can use LENGTH to truncate a long field.
PATH syntax="type"

specifies a location path that tells the XML engine where in the XML document to locate and access a specific tag for the current variable. In addition, the location path tells the XML engine to perform a function, which is determined by the location path form, to retrieve the value for the variable. The XPath forms that are supported allow elements and attributes to be individually included in the generated SAS data set.

Requirement: Whether the PATH element is required or allowed is determined by the class="ORDINAL" attribute for the COLUMN element. If the class="ORDINAL" attribute is not specified, which is the default, PATH is required and INCREMENT-PATH, DECREMENT-PATH, and RESET-PATH are not allowed. If the class="ORDINAL" attribute is specified, PATH is not allowed, INCREMENT-PATH or DECREMENT-PATH is required, and RESET-PATH is optional.
Featured in: Specifying a Location Path on the PATH Element

syntax="type"

is an optional attribute that specifies the type of syntax used in the location path. The syntax is valid XPath construction in compliance with the W3C specifications. The XPath form supported by the XML engine allows elements and attributes to be individually included in the generated SAS data set.

Default: XPATH; that is, syntax="XPATH"
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase in the location path. All location paths must begin with the root-enclosing element (denoted by a slash '/'), or with the "any parent" variant (denoted by double slashes '//'). Other W3C-documented forms are not currently supported.

To specify the PATH location path, use one of the following forms:

CAUTION:
These forms are the only XPath forms that the XML engine supports.

If you use any other valid W3C form, the results will be unpredictable.  [cautionend]

element-form

selects PCDATA (parsed character data) from a named element. The following element forms enable you to select from a named element, conditionally select from a named element based on a specific attribute value, or conditionally select from a named element based on a specific occurrence of the element using the position function:

<PATH> /LEVEL/ITEM </PATH>
<PATH> /LEVEL/ITEM[@attr="value"] </PATH>
<PATH> /LEVEL/ITEM[position()=n]|[n] </PATH>

The following examples illustrate the element forms. For more information about the examples, see Specifying a Location Path on the PATH Element.

  • The following location path tells the XML engine to scan the XML markup until it finds the CONFERENCE element. The XML engine retrieves the value between the <CONFERENCE> start tag and the </CONFERENCE> end tag.

    <PATH> /NHL/CONFERENCE </PATH>
  • The following location path tells the XML engine to scan the XML markup until it finds the TEAM element where the value of the founded= attribute is 1993. The XML engine retrieves the value between the <TEAM> start tag and the </TEAM> end tag.

    <PATH> /NHL/CONFERENCE/DIVISION/TEAM[@founded="1993"] </PATH>
  • The following location path uses the position function to tell the XML engine to scan the XML markup until it finds the fifth occurrence of the TEAM element. The XML engine retrieves the value between the <TEAM> start tag and the </TEAM> end tag.

    <PATH> /NHL/CONFERENCE/DIVISION/TEAM[position()=5] </PATH>

    You can use the following shorter version for the position function:

    <PATH> /NHL/CONFERENCE/DIVISION/TEAM[5] </PATH>
attribute-form

selects values from an attribute. The following attribute forms enable you to select from a specific attribute, or conditionally select from a specific attribute based on the value of another attribute:

<PATH> /LEVEL/ITEM@attr </PATH>
<PATH> /LEVEL/ITEM@attr[attr2="value"] </PATH

The following examples illustrate the attribute forms. For more information about the examples, see Specifying a Location Path on the PATH Element.

  • The following location path tells the XML engine to scan the XML markup until it finds the TEAM element. The XML engine retrieves the value from the abbrev= attribute.

    <PATH syntax="XPATH"> /NHL/CONFERENCE/DIVISION/TEAM@abbrev </PATH>
  • The following location path tells the XML engine to scan the XML markup until it finds the TEAM element. The XML engine retrieves the value from the founded= attribute where the value of the abbrev= attribute is ATL. The two attributes must be for the same element.

    <PATH"> /NHL/CONFERENCE/DIVISION/TEAM@founded[@abbrev="ATL"] </PATH>
INCREMENT-PATH syntax="type" beginend="BEGIN|END"

specifies a location path for a counter variable, which is established by specifying the COLUMN element attribute class="ORDINAL". The location path tells the XML engine where in the input data to increment the accumulated value for the counter variable by 1.

Requirement: If the variable is not a counter variable, PATH is required and INCREMENT-PATH and RESET-PATH are not allowed. If the variable is a counter variable, PATH is not allowed and either INCREMENT-PATH or DECREMENT-PATH is required.
Featured in: Including a Key Field with Generated Numeric Keys

syntax="type"

is an optional attribute that specifies the type of syntax in the location path. The syntax is valid XPath construction in compliance with the W3C specifications. The XPath form supported by the XML engine allows elements and attributes to be individually included in the generated SAS data set.

Default: The default is XPATH, that is, syntax="XPATH".
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. Note that XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase. All location paths must begin with the root-enclosing element (denoted by a slash '/') or with the "any parent" variant (denoted by double slashes '//'). Other W3C documented forms are not currently supported.
beginend="BEGIN|END"

is an optional attribute that specifies to stop processing when either the element start tag is encountered or the element end tag is encountered.

Default: BEGIN
RESET-PATH syntax="type" beginend="BEGIN|END"

specifies a location path for a counter variable, which is established by specifying the COLUMN element attribute class="ORDINAL". The location path tells the XML engine where in the XML document to reset the accumulated value for the counter variable to 0.

Requirement: If the variable is not a counter variable, RESET-PATH is not allowed. If the variable is a counter variable, RESET-PATH is optional.

syntax="type"

is an optional attribute that specifies the type of syntax in the location path. The syntax is valid XPath construction in compliance with the W3C specifications. The XPath form supported by the XML engine allows elements and attributes to be individually included in the generated SAS data set.

Default: The default is XPATH, that is, syntax="XPATH".
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. Note that XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase. All location paths must begin with the root-enclosing element (denoted by a slash '/') or with the "any parent" variant (denoted by double slashes '//'). Other W3C documented forms are not currently supported.
beginend="BEGIN|END"

is an optional attribute that specifies to stop processing when either the element start tag is encountered or the element end tag is encountered.

Default: BEGIN
DECREMENT-PATH syntax="type" beginend="BEGIN|END"

specifies a location path for a counter variable, which is established by specifying the COLUMN element attribute class="ORDINAL". The location path tells the XML engine where in the input data to decrement the accumulated value for the counter variable by 1.

Requirement: If the variable is not a counter variable, DECREMENT-PATH is not allowed. If the variable is a counter variable, either DECREMENT-PATH or INCREMENT-PATH is required.

syntax="type"

is an optional attribute that specifies the type of syntax in the location path. The syntax is valid XPath construction in compliance with the W3C specifications. The XPath form supported by the XML engine allows elements and attributes to be individually included in the generated SAS data set.

Default: XPATH; that is, syntax="XPATH"
Requirement: The XPath construction is a formal specification that puts a path description similar to UNIX on each element of the XML structure. XPath syntax is case sensitive. For example, if an element tag name is uppercase, it must be uppercase in the location path. If it is lowercase, it must be lowercase in the location path. All location paths must begin with the root-enclosing element (denoted by a slash '/'), or with the "any parent" variant (denoted by double slashes '//'). Other W3C-documented forms are not currently supported.
beginend="BEGIN|END"

is an optional attribute that specifies to stop processing when either the element start tag is encountered, or the element end tag is encountered.

Default: BEGIN

Previous Page | Next Page | Top of Page