- 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-clothoid
- 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
- xml-geodesic-string
- 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
FME Feature Construction
(constructing multiple features at a time)
XML data is most often hierarchal than “flat”, and so it is common to encounter elements embedded within elements for which we may want to map both child and parent as features. For example, consider a <building> with <name>, <location> and several <wall> child elements:
<building> <name>C10<name> <location>east side</location> <wall> ... </wall> <wall> ... </wall> </building>
If we want to map both <building> and <wall> elements as FME features then we need one or more mapping rules matching the <building> and <wall> elements in the xfMap’s <feature-map> element. But by default there’s only one active feature-search-set. In the example above, the <building> element will trigger the construction of a new FME feature, then immediately, the one and only feature-search-set will be set to contain mapping rules from the <feature-content-map> and it will not be set back to the <feature-map> until the </building> end element tag is read, therefore the “wall” mapping rule in the <feature-map> will never be considered for activation.
The xfMap <feature-map> element may have an optional multi-feature-construction attribute whose default value is false but may be settable to true. Setting the multi-feature-construction to true allows the XML reader to construct multiple features a time by instructing it to always create an additional feature-search-set whose content is the <feature-map>, recall that only mapping rules in the <feature-map> trigger the construction of a new feature when activated.
For example:
<feature-map multi-feature-construction=”true”> <mapping match="building"> ... </mapping> <mapping match="wall"> ... </mapping> </feature-map>