LiveCycle LifeLine Weblog

Extracting Data From Xml File

December 22, 2008 · 5 Comments

Recently I was given the following xml

geebee@yahoo.com
tblue@yahoo.com
apink@yahoo.com

The customer wanted to email the persons listed in the emails element. They wanted to use the email component provided by livecycle. The email component takes a comma separated string when you want to email multiple people. So I used setValue component to extract the emai id’s and put them into a list. The list was then converted into a comma separated string of email addresses.
I also used the script component to accomplish the same. I have put both the solutions as file attachment . Feel free to download and deploy the lca and try it out
Click here to get the pdfhandling-repeating-elements4

Categories: Xml Data
Tagged: , ,

5 responses so far ↓

  • Jack Sz. // January 8, 2009 at 8:00 pm | Reply

    Hi,

    I have an issue with referencing through code objects within a repeated sub-form.
    I was hoping if you can help me with it which would be very much appreciated.

    The sub-form is being added dynamically and contains several objects within.
    I need to hide/show one the objects (drop-down list) within the sub-form and
    this code works fine in FormCalc, but JaveScript version, which I have to use
    is giving me problems: the code below hides the object in the first instance of the sub-form
    although is called from a subsequently added sub-forms. How do I reference the objects
    in JavaScript in the added sub-form?

    This is the code:
    // Hide/show approver ddl
    var approveReq = this.rawValue;
    if (approveReq == 1) {
    xfa.form.REQUEST.MainSubForm.Systems_Subform.SYSTEM.Approver.presence = “visible”; }
    else {
    xfa.form.REQUEST.MainSubForm.Systems_Subform.SYSTEM.Approver.presence = “invisible”; }

  • Joanna Gao // February 6, 2009 at 4:18 pm | Reply

    Hi,
    If I have CDATA in my xml such as:
    ]]>

    in livecyle, can I have any way to just get the value of “Test Database”? instead of including the CDATA…

    Thanks,
    Joanna

  • Joanna // February 6, 2009 at 4:20 pm | Reply

    Hello,
    If I have CDATA in the XML element such as:

    Is there any way in livecycle I can only get the value of “Test”, instead of including “CDATA”?

    Thanks,

    Joanna

Leave a Comment