Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 3 > Batch XML Reference > Universal collectors > XML > XPathOutputMapping

XPathOutputMapping

Table of contents
No headers

XPathOutputMapping is an output mapping bean specific to XML document collection that relies on an XPath expression to specify input elements. This bean is recursive and may contain child XPathOutputMapping beans which are applied to all nodes matching the parent expression. The path expression is evaluated relative to the parent node in context. This means that the root node is the matching node from the parent mapping or document root if there is no parent mapping.

Resource Qualifiers

Resource names can be qualified by an identifier that is mapped to output from the input node or a parent node. Resource qualifiers are cumulative and applied as a prefix to any resource label defined by an OutputField . A resource qualifier stays in effect for all descendant mappings.

XPathOutputMapping Properties

<property name="resourceQualifier" value="resourceQualifier
" />

Sets an optional identifier name used as a prefix to qualify resources that are specific to service context. The qualifying identifier is expected to exist in the output when this mapping is processed.

<property name="xpathExpression " value="xpathExpression
 " />

Sets the XPath expression for resolving candidate input nodes. XPath’s expression language supports complex predicate conditions for precise scoping of input for mapping data

<property name="outputs">

Sets a list of OutputField beans that control population of CC-Record content from the source elements (matching nodes).

<property name="variables" />

Sets a list of element to variable mappings. The output variables may then be specified as input for subsequent output mappings. To specify a variable as input, set the input to ' @ ' followed by the variable name. For example, setting an input of @serviceId would populate the output from an output variable named ' serviceId '.

<property name="xpathOutputs">

Sets a list of child node mappings for recursive processing.

<property name="accumulateOnly" value="false" />

Sets a flag to bypass the default cloning behavior when processing. Only set to true when there is no risk of resource name collisions. The default is false .

<property name="inheritState" value="false" />

Sets a flag to inherit or drop the internal state identifier. The state identifier is typically used to indicate online or offline state of certain resources. Set to true if state has been mapped already and is applicable to records created by this mapping. The default is false .

Spring Batch Example

<bean class="com.cloudcruiser.batch.collect.XPathOutputMapping">
  <property name="xpathExpression" value="service[disks/disk]" />
  <property name="resourceQualifier" value="" />
  <property name="accumulateOnly" value="false" />
  <property name="inheritState" value="false" />
  <property name="variables" />
  <property name="outputs">
    <list>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="cctype" value="IDENTIFIER" />
        <property name="input" value="vmName" />
      </bean>
    </list>
  </property>
  <property name="xpathOutputs">
    <list>
      <bean class="com.cloudcruiser.batch.collect.XPathOutputMapping">
        <property name="xpathExpression" value="disks/disk" />
        <property name="outputs">
          <list>
            <bean class="com.cloudcruiser.batch.collect.OutputField">
              <property name="cctype" value="IDENTIFIER" />
              <property name="input" value="name" />
              <property name="label" value="diskName" />
            </bean>
            <bean class="com.cloudcruiser.batch.collect.OutputField">
              <property name="cctype" value="RESOURCE" />
              <property name="input" value="sizeGB" />
              <property name="label" value="diskGB" />
            </bean>
          </list>
        </property>
      </bean>
    </list>
  </property>
</bean>
 
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP