US and Worldwide: +1 (866) 660-7555
Results 1 to 2 of 2

Thread: Re : XML input step

  1. #1
    samatar hassan Guest

    Default Re : XML input step

    XML Input XPath

    --> Nice idea

    However, if it's not backward
    compatible (and it is probably not), you should not be changing the existing
    step.

    --> I am afraid not :-)
    I started working on the existing one and send it to you for testing purprose.
    It will be a new step .

    Rgds

    Samatar HASSAN

    Fixe: 02-35-63-03-45
    GSM: 06-68-28-68-02

    ----- Message d'origine ----
    De : Matt Casters <mcasters (AT) pentaho (DOT) org>
    : kettle-developers (AT) googlegroups (DOT) com
    Envoy le : Dimanche, 20 Mai 2007, 12h58mn 30s
    Objet : RE: XML input step




    DIV {
    MARGIN:0px;}



    Dear Samatar,



    That sounds great. However, if it's not backward
    compatible (and it is probably not), you should not be changing the existing
    step.

    Call it XML Input XPath or something and give it a
    different ID.



    All the best,

    Matt






    From: kettle-developers (AT) googlegroups (DOT) com
    [mailto:kettle-developers (AT) googlegroups (DOT) com] On Behalf Of samatar
    hassan
    Sent: Sunday, May 20, 2007 5:31 AM
    To:
    kettle-developers (AT) googlegroups (DOT) com
    Subject: XML input
    step





    Hello
    all,

    This day, i worked on XML input step.
    The goal is to loop on a
    specified node and then extract path.

    The number of rows is the number of
    occurence found.

    I made some (simple) tests on the following file
    :

    <?xml version="1.0"
    encoding="UTF-8"?>
    <Rows>
    <Row><Nom>Hassan</Nom><Prenom>sam</Prenom><Age>29</Age></Row>
    <Row><Nom>Hassan</Nom><Prenom>Isaac</Prenom><Age>3</Age></Row>
    <Row><Nom>Hassan</Nom><Prenom>Emilie</Prenom><Age>25</Age></Row>
    <Row><Nom>Hassan</Nom><Prenom>Souleyman</Prenom><Age>1</Age></Row>
    </Rows>

    Image
    we want to get the Name, Prenom (First name) and age like
    :

    Nom | Prenom |
    Age
    -------------------------
    Hassan |
    sam | 29
    Hassan
    | Isaac |
    3
    Hassan | Emilie | 25
    Hassan
    | Souleyman | 1

    You have just to define :

    - Loop
    XPath = Rows/Row

    and fields :

    - Name
    XPath Type

    Col1 Nom
    String

    Col2
    Prenom String


    Col3
    Age Integer



    I also made all vars env
    sensible.

    The process is simple bur powerfull.
    I attached the code
    (for the moment it's an update of the XML input)

    I will probably create
    another XML input step ( Too many XML step ??? :-) )

    I attached the
    sample transformation and the sample XML file.

    Rgds


    Samatar HASSAN




    Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail











    _____________________________________________________________________________
    Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers-unsubscribe (AT) g...oups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

  2. #2
    Sven Boden Guest

    Default Re: Re : XML input step

    Do we an idea of which other XML steps we want or need? The more steps
    the more maintenance (I don't think we can support all possible XML's
    out of the box), and I'm kind of losing track of which XML step to use
    in which cases.

    Regards,
    Sven

    P.S. The new step is not really 1.4 compatible and "blows" up the ant
    build (with a JDK1.4)



    samatar hassan wrote:

    > XML Input XPath
    >
    > --> Nice idea
    >
    > However, if it's not backward
    > compatible (and it is probably not), you should not be changing the existing
    > step.
    >
    > --> I am afraid not :-)
    > I started working on the existing one and send it to you for testing purprose.
    > It will be a new step .
    >
    > Rgds
    >
    > Samatar HASSAN

    ....
    SNIP SNIP
    ....


    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers-unsubscribe (AT) g...oups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •