LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  XMLpy conditions

    Employee
    Posted 11-08-2013 14:10

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: raylee

    Is it possible to put conditions in XMLpy? If so, how?

    My XML is response from a webservice. Normally there should be a root node and only 1 element. The single element then contains nodes which I need. I can get this no problem. Let's call this Group A.

    There are 2 other cases which can come result from the web service. One is multiple elements. So root node and multiple elements under it. Let's call this Group B. The other is a node <status>status value</status>. Let's call this Group C.

    What I need to do is divide each of the cases into separate outputs. This part I should be able to do this via the pin argument for outputRecord.

    Anyone have any idea how I can split up Groups A, B, C into it's own output?

    Ray


  • 2.  RE: XMLpy conditions

    Employee
    Posted 12-06-2013 07:25

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hi,

    Sorry for the delay in responding.
    I'm not quite sure I understand exactly what you are trying to do.
    Is it the case that you want to split the data based on the structure of the XML - for instance (using the example of Group A, Group B, Group C) is it the case that if you see a <A> you want the elements under that structure to go to one output, and elements under <B> to go to another?

    If so, perhaps the attached example can help.

    We've just released a new node "XML Data" with version 2.16 of the Lavastorm Analytics Library which should greatly simplify the acquisition of XML data.
    This will work against LAE 4.6.1..

    In the example, I've created three different XML structures, which I think is what you are talking about, and then parsed them through the XML Data node and output them to different node outputs...

    Does this help?

    Tim.
    Attachments:
    splittingXmlExample.brg