Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

WellFormedModifier

WellFormedModifier

In an
XmlStreamer
, the
WellFormedModifier
component ensures that a segment is well-formed XML. It can add opening, closing, or root tags as required for this purpose.
The following table describes the properties of the
WellFormedModifier
component:
Property
Description
disabled
Determines whether the Script ignores the component and all of the child components. Use this property to test, debug, and modify a Script. You can choose one of the following options:
  • Selected. The Script ignores the component.
  • Cleared. The Script applies the component.
The default is cleared.
name
A descriptive label for the component. This label appears in the log file and the
Events
view. Use the
name
property to identify the component that caused the event.
new_root_element
Defines the root element. The root element must be an ancestor of the segment. If you do not assign this property, the modifier does not add a root element.
remark
A user-defined comment that describes the purpose or action of the component.
Consider the following XML input:
<stream> <headerline1>...</headerline1> <substreams> <substream> <subheaderline1>...</subheaderline1> <segments> <segment1>...</segment1> <segment1>...</segment1> <segment1>...</segment1> </segments> <subfooterline1>...</subfooterline1> </substream> <substream>...</substream> <substream>...</substream> </substreams> <footerline1>...</footerline1> </stream>
Suppose you configure an
XmlStreamer
that returns the following header, which is not well-formed XML:
<substream> <subheaderline1>...</subheaderline1> <segments>
If you apply
WellFormedModifier
to this header, the modifier adds the closing tags. The result is the following well-formed segment:
<substream> <subheaderline1>...</subheaderline1> <segments> </segments> </substream>
Now suppose that you configure
WellFormedModifier
to add
<stream>
as a root element. The result is:
<stream> <substreams> <substream> <subheaderline1>...</subheaderline1> <segments> </segments> <substream> <substreams> </stream>
Notice that the modifier added the
<stream>
and
<substreams>
elements, preserving the skeleton structure of the original XML.