Component Fields

Some file formats, like EDI, allow fields to be subdivided into arrays, sub-fields, or composite fields. Collectively, these fields are referred to as component fields in Convert to XML. Typically, the headers of these files contain information about the character used to specify component fields. Convert to XML uses this information to set the default value for the Field Component Separator property and render XML output accordingly.

Consider the following input file, which uses a colon (:) to specify component fields:

Make:Model:Year
               
BMW:R1150RS:2004
               
MZ:Scorpion:1995
               
Ducati:ST2:1997
               

            

Using default values for the Field Element Name ( field) and Component Element Name ( component), Convert to XML creates the following XML output:

<?xml version="1.0" encoding="utf-8"?>
               
<root>
               
	<row>
               
		<component><field>Make</field><field>Model</field><field>Year</field></component>
               
	</row>
               
	<row>
               
		<component><field>BMW</field><field>R1150RS</field><field>2004</field></component>
               
	</row>
               
	<row>
               
		<component><field>MZ</field><field>Scorpion</field><field>1995</field></component>
               
	</row>
               
	<row>
               
		<component><field>Ducati</field><field>ST2</field><field>1997</field></component>
               
	</row>
               
</root>
               

            

Here, the fields Make, Model, and Year are created as sub-fields of the <component> container element.

For line-oriented regions in files containing component fields, you can change the default Field Component Separator property, and the Component Element Name property, that is, the name you want to use for the component fields' container element.

Using the Stylus Studio XML Grid View

This free onlince video tutorial shows how to use the Stylus Studio XML Grid View.

OASIS Catalog Support

Stylus Studio's features for working with OASIS catalogs allow you to incorporate any vendor's catalog - or one of your own - in your XML, making writing correct and robust XML easier than ever.

Telecommunications Companies That Use Stylus Studio

Can you here me now? When it comes to telecommunications and XML it can get a little fuzzy. That's why these top telecommunication companies turn to Stylus Studio to connect them to their XML needs.

Writing Custom XML Adapters

There are cases where the input format is too complicated for Convert to XML, or both reading and writing of the file format is needed. This section will take you through the process of writing a medium-sized adapter in Java.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member