Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Complex XML generation

  1. #1
    Join Date
    Jun 2009
    Posts
    23

    Default Complex XML generation

    Hi team,

    I am fairly new to pentaho's kettle transformation. I am trying to use it for the first time in our project where a periodic file needs to be transformed to a certain XML output.
    I am attaching the file-input, my sample-transformation, expected xml-output.

    Can someone help me out how to get the expected XML output.

    <userRequests>
    <saveUser>
    <login access-id="test" account-id="test" password="password"/>
    <user active="true" sponsor-id="1" time-zone-id="America/Chicago" user-name="12345678@1239">
    <user-properties>
    <user-property name="CALLER_ID">8001230035</user-property>
    </user-properties>
    </user>
    </saveUser>
    <saveUser>
    <login access-id="test" account-id="test" password="password"/>
    <user active="true" sponsor-id="1" time-zone-id="America/Chicago" user-name="12345678@1241">
    <user-properties>
    <user-property name="CALLER_ID">8001230035</user-property>
    </user-properties>
    </user>
    </saveUser>
    <saveContactPoint>
    <login access-id="test" account-id="test" password="password"/>
    <contact-point hold-during-quiettime="true" name="Primary Email" status-id="1" user-id="160">
    <email-address address="john.doe@acme.com" allow-html="false"/>
    <quiet-time local-start-time="20:00:00" local-end-time="08:00:00"/>
    </contact-point>
    </saveContactPoint>
    <saveContactPoint>
    <login access-id="test" account-id="test" password="password"/>
    <contact-point hold-during-quiettime="true" name="Primary Email" status-id="1" user-id="160">
    <email-address address="john.doe@acme.com" allow-html="false"/>
    <quiet-time local-start-time="20:00:00" local-end-time="08:00:00"/>
    </contact-point>
    </saveContactPoint>
    </userRequests>
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    I would probably use JavaScript and E4X to do it. (PDI >= 3.1)

  3. #3
    Join Date
    Jun 2009
    Posts
    23

    Default

    Can you point to some sample examples which use E4X to create custom XML fields.

    thanks

  4. #4

    Default

    There are some examples by Daniel Einspanjer in 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.