Hitachi Vantara Pentaho Community Forums
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: RSS XML Output

  1. #1
    Join Date
    May 2007
    Posts
    21

    Default RSS XML Output

    Has anyone successfully generated RSS XML using Kettle?


    I can get Kettle to generate this.

    <?xml version="1.0" encoding="UTF-8"?>
    <Channel>
    </Channel>

    but I need this

    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="2.0">
    <Channel>
    </Channel>

    Kettle can generate 99.9% of what I need out of the box, but I do not know how to add the <rss version="2.0"> element to the top of the file before adding the channels and items.


    Any help would be appreciated.

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

    Default

    Well in that case, perhaps you can apply a small XSLT after XML generation?

  3. #3
    Join Date
    May 2007
    Posts
    21

    Default XSLT Transform

    Matt,

    Do you have any samples, suggestions or direction on what an XSLT transform would look like to do this?

    I am not that familiar with XSLT.

    I am familiar with the SAX XML parser, but that is not available in PDI, right?

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

    Default

    I'm no XSLT expert myself, although I have used it a few times in the past. (To fix a faulty CWM reference model no less)

    XSLT is actually pretty powerful. The typical use is to read XML data to transfer that into formatted HTML document etc.
    However, the simple use is to convert XML to XML.
    I googled a few examples here: http://www.topxml.com/xsltStylesheet...XML_to_XML.asp

    As you can see, the .XSL document is not too hard to understand. Adding a fixed attribute would surely be possible. Unfortunately I don't have the time to figure it out for you. Given the fact that I love to dabble with these things, that's a real shame.

    Matt

  5. #5
    Join Date
    May 2007
    Posts
    21

    Default XML to XML

    Thanks Matt.

    I will give it a go and post back my findings.

    Maybe an RSS Output in Kettle's future?

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

    Default

    Actually, someone should write a plugin for it and just put it in our plugin list.
    It's not that hard to do in any case.

    Anyone? Anyone? Anyone? Bueller?

  7. #7
    Join Date
    Sep 2008
    Posts
    7

    Default RSS output would be great

    I am at this exact same point also.

    I can get this.

    <?xml version="1.0" encoding="UTF-8"?>
    <Channel>
    </Channel>

    but I need this

    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="2.0">
    <Channel>
    </Channel>

    I also tried to pass <items> in a variable/field to --> custom output item fields --> RSS plug-in.

    For some reason it adds an extra <item /> . Wierd.
    is there another way?

    <?xml version="1.0" encoding="iso-8859-1" ?>
    - <rss version="2.0">
    - <channel>
    <title>Name</title>
    <description>Clydes Description</description>
    <link>www.link.com</link>
    <category>kettle</category>
    - <item>
    <item />
    <unique_id>54321</unique_id><contact_name>Janet </contact_name><company_address>1234 Agent company address</company_address><company_city>Sarasota</company_city> </item>
    - <item>
    <item />
    <unique_id>54321</unique_id><contact_name>Janet </contact_name><company_address>1234 Agent company address</company_address><company_city>Sarasota</company_city>
    </item>
    </channel>
    </rss>


    Seems like there should be simple work around, but I have been working all day and can not find it.
    Please, Please help
    Thanks
    Clyde
    Last edited by cbaxter; 09-28-2008 at 06:16 AM.

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

    Default

    Dear Thread Hijacker, RSS Input and Output steps have already been written as a plugin:

    http://wiki.pentaho.com/display/EAI/...ation+Plug-Ins

  9. #9
    Join Date
    Sep 2008
    Posts
    7

    Default

    Sorry, didnt mean to hijack the thread, this seemed like the right place to post since I have the same problem as the original poster.

    I actually have been using the RSS plug-in.
    the problem is as I mentioned earlier

    I pass <items> in a variable/field to -->
    "custom output item fields" of the RSS plug-in.

    For some reason the plug-in adds an extra <item /> tag to the output.
    (please see the example RSS output in my last post.)


    Pentaho is absolutely great but I seem to have hit a wall trying to output a custom rss format.
    Any help is appreciated.
    Thanks in advance.
    Last edited by cbaxter; 09-28-2008 at 09:42 PM.

  10. #10

    Default

    Hi Clyde,

    Can you please post your sample transformation?

    Thanks

    (I reply to your private mail)

    Samatar
    Samatar

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.