Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: XML file to Xsd content coversion

  1. #1
    Join Date
    Feb 2017
    Posts
    10

    Exclamation XML file to Xsd content coversion

    Hi,
    My self Naresh, I am new to this PDI and I am trying to learn..
    My requirement is-> I have a Xml file which is having clumsy data so i want to convert this data to normal Xml(xsd) file. can anyone help me to solve this issue
    please find the examples of Xml file(source) and Xml(xsd)(desired out put) files in attachments.

    Thanks in advance
    Attached Files Attached Files
    Last edited by nareshreddy; 02-21-2017 at 08:36 AM.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    There's not very much to learn about PDI with this task.
    What you need is an XSL-T script to do the conversion.
    You can use the XSL-Transformation job entry to start the process.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Feb 2017
    Posts
    10

    Default

    Hi Marabu,


    Thanks for your quick response, Can you please give me the steps to achieve the result. I mean how XSL-T is work on XML file.

    Thanks in advance,

    Regards,
    Naresh Reddy

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It's really simple: You create a new Job, drag and drop Start and XSL-Transformation job entries on the work area, then connect both.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Feb 2017
    Posts
    10

    Default

    Thank you so much for your patience and assistance. Actually i need output in XSD format not as XSL. Can you please help me on this. FYI I have good knowledge on IBM Cognos BI tool but I am new to this ETL environment.

    Thanks.
    Regards,
    Naresh

  6. #6
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I'll try with other words.

    Your source document is "Flat XML", a simple XML representation of rows and fields.
    You want to create a more structured document from that, outlined by the provided schema.
    An XSL-T script is the natural way to create the desired output.
    Don't expect Kettle (PDI) to generate the XSL-T script for you if you hurl an XML output schema and a sample input document at it.
    If Cognos can do that for you, you are wasting time here.

    Of course, there are Kettle steps to produce the desired output, too, if you prefer the long and winding road.
    There's a demo transformation named "XML Add - creating multi level XML files" in your Kettle installation folder.

    Since the XML documents are stored in the filesystem (you said so), I wouldn't bother about ETL at all - I would call an XSL processor from a command line.
    So long, and thanks for all the fish.

  7. #7
    Join Date
    Feb 2017
    Posts
    10

    Default

    Thank you so much for your brief explanation, Any how i'm working on this desired output.
    I will let you know once i get the solution.

    Regards,
    Naresh Reddy

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.