XML Transformation Template Scenario

Multidimensional XML representation

XML Converter is now available!

In order to present your data (Excel file, Access database etc.) to the user in an attractive way in browser, mobile phone or PDF format, the original data must first be converted to the necessary XML formats. XML documents and data can be available in almost any structure whatsoever. Everyone can define own XML document structure and describe it. However, a standard database table (Excel spreadsheet, Oracle table/view) is a plane, two-dimensional representation of data content. When you convert your data source table to XML format you get a plane column-row shaped XML output.
More and more data documents are wrapped in XML format. Mining the source data documents involves mining the corresponding XML structures. However, the tree structured XML makes it a rather difficult for traditional data mining algorithms to work properly. XMLFox XML editor is proposed to mine XML documents. Its interface is mainly focus on mining frequent tree structures from XML documents. How to mine infrequent structures which are also important in many applications, such as query processing and identification of exceptional cases? Rustemsoft XML Converter is intended to consider the problem of identifying infrequent tree structures in XML documents. Intuitionally, if a tree structure is infrequent all tree structures that contain this sub-tree are also infrequent. XML Converter considers the infrequent structure, which is an infrequent structure while all its appropriate sub-trees are frequent. XML Converter derives a level-wise mining algorithm that makes use of some effective loping techniques to efficiently discover all infrequent structures and transmits source data to structured XML output.

What to do if you need to get an especially structured XML file from your Excel source (or from other data storage)? How to create an XML with your particular multi-level tagged tree structure from your specially formatted data source Excel spreadsheet?

XML Converter 7.00 is available!
More about XML Converter
Download XML Converter
Order XML Converter

First we would like to present a simple example showing the XML format, which XML Converter generates from an Excel source. The example is based on the document shown in Figure 2. It is an XML document consisting of the elements Cars and, in it, Car, Details and Detail. Top level of XML source tree is 'Sheet1'. It presents every 'Corporation'. The 'CARS' tag is a direct parent of elements such as 'Car', 'Details' and 'Detail'. You can see an Excel data source spreadsheet on figure 1, which is converted to the shown XML output. Also you can see this readable XML presentation, which is accompanied with an XSL stylesheet.

Figure 1. A specially structured Excel data source spreadsheet


XML Conversion Scenario

XML Transformation Scenario is designed for transforming any data source content into a multidimensional XML documents by using XML Converter. It is a part of interface of the conversion software. This XML Converter feature provides capabilities to design and edit XML Transformation Scenario for your final structured XML document, which you get by transforming some data source. The XML Converter creates a generic template-scenario of a document. This interface provides capabilities to create an XML document template-scenario based on a specific data source content. Contents can be saved as an XML document with embedded XSD.

The XML Converter lets you create and define a template scenario for an XML document as a structured tree of concepts that can be queried directly by users. This conversion scenario forms the basis for creating and editing an XML output according to the criteria defined for each data source column in the template scenario. The scenario consists of structured tags tree that is invariant and, columns and complex data representation that define the content of a final XML document.

The tags tree is made up in convenient data grid form. In a scenario background you will need to identify Tag Level of each data column, Tag Names, Sub Tag Names, Group Rows Names as a complex data representation to define structure of an XML document. See figure 4.

The XML Converter lets you create complex representation by grouping columns as a node-structured tree. The XML Converter uses a predefined template scenario to create structured XML content according to the template definition. The content can then be stored as XML. The XML Converter can also be used to create an XML DTD or XSD Schema for the document.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<table name="Sheet1">
<Sheet1>
<Number1>1</Number1>
<Corporation2>CHRYSLER</Corporation2>
<CARS>
<Car>
<Car_Name3>ARIES </Car_Name3>
<Year4>88 </Year4>
<Color5>Blue </Color5>
<DETAILS>
<Detail>
<Model6>Basic </Model6>
<Price7>1000000 </Price7>
</Detail>
<Detail>
<Model6>AA </Model6>
<Price7>2000000 </Price7>
</Detail>
<Detail>
<Model6>BB </Model6>
<Price7>30000 </Price7>
</Detail>
</DETAILS>
</Car>
<Car>
<Car_Name3>DIPLOMAT </Car_Name3>
<Year4>89 </Year4>
<Color5>Red </Color5>
<DETAILS>
<Detail>
<Model6>Basic </Model6>
<Price7>1000000 </Price7>
</Detail>
<Detail>
<Model6>BB </Model6>
<Price7>1500000 </Price7>
</Detail>
</DETAILS>
</Car>
<Car>
<Car_Name3>CARDOBA </Car_Name3>
<Year4>92 </Year4>
<Color5>Mist </Color5>
<DETAILS>
<Detail>
<Model6>Basic </Model6>
<Price7>100000 </Price7>
</Detail>
<Detail>
<Model6>AA </Model6>
<Price7>200000 </Price7>
</Detail>
</DETAILS>
</Car>
</CARS>
</Sheet1>
</table>


Figure 2. Final XML output


XML Converter offers two interchangeable schema methods for XML multi-dimensional conversion. You can select one of the following conversion methods:
1. External XSD schema mapped conversion
2. Predefined XML Transformation Scenario
You can choose the first "External XSD schema mapped conversion" method when you got XSD schema file where XML output structure is specified.
Also you can select second "Predefined XML Transformation Scenario" method when you do not have an XSD schema specified. For this case you will need to specify XML output structure.



1. External XSD schema mapped conversion

Let's say you have a CSV file that needs to be converted to XML based on XSD file. You got an XSD file and you have to create XML using the XSD file and then you have to send that XML with data to another application on different server and different location, where some another application will get data from that XML, process the data and return the result back to you. How to create XML using XSD in XML Converter interface? How to generate an XML file based on the schema you are given with?

Figure 3. External XSD schema mapped conversion Interface


First you have to open an XSD schema file that you have stored on your hard drive or other network location. Push "Open XSD schema" button and select an XSD file you need to work on. If the selected XSD is correct it will be expanded as a structured tree in "XSD schema mapped conversion" interface window. Each tree node marked as a blue triangle has a unique name. These nodes will represent elements of your XML output file.

When you click on each schema node/element a dropdown list will appear. The dropdown list presents column names of data source that you want to convert to XML. You have to assign the columns in each elements of the schema with the column names values.

By clicking "Ok" button you will store XSD schema settings and then XML output will be produced.



2. Predefined XML Transformation Scenario Interface

XML Converter gives you ability to adjust and save a transformation template scenario for each converted table(spreadsheet). Once you set this template scenario for your particular data source next time you will be able to reuse your previous stored setting. How to generate a Scenario for a specially structured Excel data source by using the Converter? Our example is based on shown above Excel spreadsheet and its final XML output. Please follow the several steps:

Figure 4. XML Transformation Scenario Interface


On the "Options" form select "Use predefined XML Transformation Scenario" checkbox.

Try to create some XML output from your data source. During the creation a special "XML Transformation Scenario" shown above interface window will appear. By using this interface you will adjust and save a transformation template-scenario for each converted table.

First you will get a template for a plain table. In column 'Level' all table fields will have the same first level '>'. Values for columns 'Column Name' and 'Tag Name' will be equal. You may give new values for 'Tag Name' for every table column of your data source. During the subsequent transformation all XML tag names will be replaced with these new values.

By clicking on 'Level' column buttons for each table column you will be able generate a tree structure for your XML output. When you increase a tag level you will need to insert a name for this new tag to 'Sub Tag Name' field. Every change you make in data grid will be reflected in 'XML Structure view' window, where you can see an XML final structure representation.

To combine all rows under the same structure level you will need to give a name for this group of rows in 'Rows Tag Name' column.

If you need you can insert particular char strings into "Prefix" and "Suffix" fields.


Only one rule. To get an XML output with a structure, which you need, your data source has to look like the sample Excel spreadsheet shown above on figure 1. By using XML Transformation Scenario interface you let know to XML Converter what a structure you would like to provide for a generated XML.



Prefixes and Suffixes

Sometimes users want to include XML output's columns values in specified char combinations. For example, some of fields in user's spreadsheet need to be set in a CDATA tag. XML Converter allows you to specify one attribute as being of type CDATA and have it apply to all instances of that element in the XML. For this case Scenario interface has two fields: "Prefix" and "Suffix".

Example
There is the structure of a sample Excel sheet with four columns here:

LastName
FirstName
City
Detail

What we probably need to happen is that for every record in the XML, the "Detail" attribute will be enclosed with a CDATA tag because its likely to contain HTML and other markups in it and it will be used by the Flash, which wants to see that kind of data in a CDATA tag. This is what we may get first by using XML Converter:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Playerlist>
<Player>
<LastName DataType="String">Daniels</LastName>
<FirstName DataType="String">Chris</FirstName>
<City DataType="String">Chicago</City>
<Detail DataType="String">He is the bomb. I love it</Detail>
</Player>
<Player>
<LastName DataType="String">Willard</LastName>
<FirstName DataType="String">Fred</FirstName>
<City DataType="String">St. Louis</City>
<Detail DataType="String">Funny guy</Detail>
</Player>
<Player>
<LastName DataType="String">Nutx</LastName>
<FirstName DataType="String">Deez</FirstName>
<City DataType="String">Akron</City>
<Detail DataType="String">This is where its at</Detail>
</Player>
</Playerlist>



In Scenario interface for "Prefix" field we insert "<![CDATA[" and for "Suffix" - "]]>" strings. After reconverting we can get the following XML output:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Playerlist>
<Player>
<LastName DataType="String">Daniels</LastName>
<FirstName DataType="String">Chris</FirstName>
<City DataType="String">Chicago</City>
<Detail DataType="String"><![CDATA[He is the bomb. I love it]]></Detail>
</Player>
<Player>
<LastName DataType="String">Willard</LastName>
<FirstName DataType="String">Fred</FirstName>
<City DataType="String">St. Louis</City>
<Detail DataType="String"><![CDATA[Funny guy]]></Detail>
</Player>
<Player>
<LastName DataType="String">Nutx</LastName>
<FirstName DataType="String">Deez</FirstName>
<City DataType="String">Akron</City>
<Detail DataType="String"><![CDATA[This is where its at]]></Detail>
</Player>
</Playerlist>



XMLFox Advance XML editor

XMLFox is a software tool used to read XML documents and provide access to their content and structure. The XMLFox generates a hierarchically structured tree, then hands off data to viewers for processing, and finally returns the results to its browser windows (XML view, XML script, XML tree, and XML grid). The validating XMLFox editor also checks the XML syntax as well as XSD schema structure and reports errors.



About Rustemsoft

Rustemsoft works on things that matter. Rustemsoft LLC is a creative ISV (Independent Software Vendor) specializes in intelligent software solutions for Xcode programmers, XML designers, and .NET developers. The smart people and the smart technologies taking on the complex tasks. Not just imagining. Doing. Rustemsoft works.

Copyright © 2001-2017 Rustemsoft LLC

Skater .NET Obfuscator

TouchControls iOS Framework

XMLFox

Home

Products

Downloads

Articles

Company

Support