- XML (Extensible Markup Language) Reader/Writer
- XML Quick Facts
- Workbench XML Reader Parameters
- Workbench XML Writer Parameters
- Feature Representation
- Mapping File Reference
- xfMap
- Reading the Input XML Document
- Mapping Rules
- Types of Mapping Rules
- Match and Except Expression
- Specifying Several Match Expressions for One Mapping Rule
- Limiting Mapping Rule Activation with Except Expressions
- Mapping Rule States (activation, execution, suspension, and de-activation)
- Using Force Elements During Mapping Rule Activation and Deactivation
- Search-sets
- Expression Elements (Extract and Literal)
- Expression Sequence
- Feature Mapping Rules
- FME Feature Construction
- Feature Type Element
- Attributes Element
- FME Feature Construction (defining mapping rules under the <feature-content-map> element)
- Attribute Element (handling multiple values)
- Attribute Element (handling optional attributes)
- Attribute Element (sequenced attributes)
- Attribute Element (Nillable Attributes)
- Geometry Element
- Geometry Builder States (activation, execution, suspension, and de-activation)
- Geometry Construction
- Composite Geometry Builders
- Built-in Geometry Builders
- xml-point
- xml-point-xy
- xml-line
- xml-area
- xml-donut
- xml-aggregate
- xml-box
- xml-text
- xml-path
- xml-arc
- xml-arc-by-center-point
- xml-elliptical-arc
- xml-circle
- xml-polygon
- xml-face
- xml-composite-surface
- xml-triangulated-surface
- xml-enclosed-surface
- xml-composite-solid
- xml-multi-point
- xml-multi-curve
- xml-multi-area
- xml-multi-text
- xml-multi-surface
- xml-multi-solid
- xml-null
- xml-reverse-geometry
- fme-geometry
- Mapping Segmented Geometric Information
- Geometry Traits (trait element)
- FME Feature Construction (constructing multiple features at a time)
- Structure Element
- References Element
- Apply References Element
- Group Mapping Rules
- Reference Mapping Rules
- Mapping Rules (Optional Elements)
- More Expression Elements
- FME Schema Features
- Reading the Input XML Document
Inline FME Schema Features
The xfMap has a mechanism to specify schema features in its content. This is done through the <schema-type> element’s <inline> element.
The <inline> element can contain zero or more <schema-feature> child elements. A <schema-feature> element represents an FME schema feature explicitly; it contains a type attribute that specifies a schema feature’s feature type, and zero or more <schema-attribute> elements that specify the schema feature’s attributes and attribute types.
The <schema-attribute> element has two required attributes, they are the name and type attributes. The value for the type attribute must be an FME attribute type: xml_char(#), xml_int16, xml_int32, xml_real32, xml_real64, xml_decimal(#,#), or xml_boolean.
The following example illustrates the usage of the <inline> element. When the XML Reader is requested for FME schema features and the xfMap below is used, then a schema feature of feature type states having 9 user-defined attributes – AREA, CODE, NAME, POP1990, POP90_SQMI, P_URBAN90, P_ING_LANG, P_EMPL_SEC, and HSE_UNIT90 – and no geometry is returned.
<?xml version="1.0" encoding="UTF-8"?>
<xfMap>
<schema-type>
<inline>
<schema-feature type="states">
<schema-attribute name="AREA" type="xml_decimal(16,3)"/>
<schema-attribute name="CODE" type="xml_char(4)"/>
<schema-attribute name="NAME" type="xml_char(25)"/>
<schema-attribute name="POP1990" type="xml_decimal(11,0)"/>
<schema-attribute name="POP90_SQMI" type="xml_decimal(20,6)"/>
<schema-attribute name="P_URBAN90" type="xml_decimal(20,6)"/>
<schema-attribute name="P_ING_LANG" type="xml_decimal(20,6)"/>
<schema-attribute name="P_EMPL_SEC" type="xml_decimal(20,6)"/>
<schema-attribute name="HSE_UNIT90" type="xml_decimal(11,0)"/>
<schema-attribute name="fme_geometry{0}" type="xml_no_geom"/>
</schema-feature>
</inline>
</schema-type>
...
</xfMap>