Data integration solutions

Source: Internet
Author: User
Tags object serialization xsl xsl file

Data integration is one of the main tasks of Enterprise Application Integration. Its main difficulties are:

1. The data source formats vary widely;

2. complicated data conversion process;

3. Non-invasive requirements;

4. Heavy workload;

Based on my development and application experience in data integration, I recommend this data integration solution by referring to some data integration tools on the market:

In the above scheme:

1. The dao_output component outputs the source data in the form of an XML file;

2. The dao_input component parses XML files and stores them in the target database;

3. the compiler is responsible for loading User-Defined XSL style sheet files and converting the source XML file into the target XML file, so that the data conversion process is decoupled from the data conversion logic;

Automation:

1. The source data is output in XML format, which can be automated and unattended (supported by multiple advanced development languages );

2. the XSL file can implement complex custom conversion and programming function extension (http://www.ibm.com/developerworks/cn/xml/x-xsltext? S_tact = 105agx52 & s_cmp = tag-csdn );

3. The target XML can be fully defined as the object serialization format. After the dao_output component assembles the object, it can perform batch storage operations.

Using the C # compiler of Saxon. API: (Saxon. API: http://www.saxonica.com/index.html)

 

Using system;
Using system. text;
Using Saxon. API;
Namespace Design
{
Class sample
{
Public sample ()
{
Try
{
// Create a processor instance.
Processor processor = new processor ();
// Load the source document
Xdmnode input = processor. newdocumentbuilder (). Build (New uri (@ "D:/Dai/project/bin/debug/books. xml "));
// Create a compiler
Extends tcompiler compiler = processor. newcomputcompiler ();
// Compile all stylesheets
Effecttransformer transformer = compiler. Compile (New uri (@ "D:/Dai/project/bin/debug/books-csv.xsl"). Load ();
// Now run them in Series
// Xdmdestination results1 = new xdmdestination ();
Transformer. initialcontextnode = input;
Xdmdestination Results = new xdmdestination ();
Transformer. Run (results );
Console. writeline ("after phase :");
Console. writeline (results. xdmnode. outerxml );
}
Catch (dynamicerror E)
{
Console. writeline (E. Message );
// E. errorcode;
// E. iswarning;
// E. linenumber;
}
Catch (exception ex)
{
Console. writeline (ex. Message );
}
}
Static void main ()
{
Sample S = new sample ();
Console. Read ();
}
}
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.