XML Node parse and assign

Sort:
You are not authorized to post a reply.
Author
Messages
Steph76
Basic Member
Posts: 18
Basic Member

    Hello,

    I need to create a PF to update the date fields for a job. I have a Lawson Transaction Node to Inquire on the job and an XML Node to parse the output from it so I can get the current settings. I do not have an XSD. I noticed some of the fields have a dash in the name and I'm having a problem when trying to assign the value to a variable. Fields without a dash return a value. For example, XML9300_output.AR580[0].COMPANY, returns the Company. When trying to get the process level using XML9300_output.AR580[0].PROCESS-LEVEL, nothing is returned. I've tried the following different ways to get the value and I either get nothing or "error evaluating". Has anyone else run into this?

     

    XML9300_output.AR580[0].["PROCESS-LEVEL"] - error on node error evaluating

    XML9300_output.AR580[0]."PROCESS-LEVEL" - error on node error evaluating

     

    ** Lawson V10, IPD Product Version: 10.1.1.30.4710

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Replace the dash - with an underscore _
      David Williams
      Steph76
      Basic Member
      Posts: 18
      Basic Member

         

        Thanks. I was overcomplicating it. I didn't need the XML Node.

        t2
        Basic Member
        Posts: 4
        Basic Member
          Hello, can you please share the exact assign node syntax that you are using? I've tried numerous syntax combinations and can't retrieve an individual node value - only the entire xml doc (XMLnnnn_output) assigned in the xml parse node.

          Thanks, Todd
          David Williams
          Veteran Member
          Posts: 1127
          Veteran Member

            Todd - are you referencing a Schema file? If so, then the XML should parse correctly and, depending upon the layers in the XML, can be referenced:
            ponumber = Parse_output.*:: DataArea.*:: SupplierInvoice.*:: SupplierInvoiceHeader.*:: PurchaseOrderReference.*:: DocumentID.*:: ID

            (Ignore the space after the double colon)

            David Williams
            t2
            Basic Member
            Posts: 4
            Basic Member
              Hi David, I don't have a schema - just the XML output from the batch job inquire.
              David Williams
              Veteran Member
              Posts: 1127
              Veteran Member
                There are free resources online that will create a schema from the XML output for you.
                David Williams
                David Williams
                Veteran Member
                Posts: 1127
                Veteran Member
                  You can try to reference the data elements as from my example without a schema - I'm not sure if it will work.
                  David Williams
                  t2
                  Basic Member
                  Posts: 4
                  Basic Member
                    Hi David - wasn't aware that the schema was required - I've generated one and will try - Thanks!!
                    t2
                    Basic Member
                    Posts: 4
                    Basic Member
                      I've just never seen a sample flow that has the xml parse working - If you have a simple example, that would be much appreciated.

                      Thanks, Todd
                      David Williams
                      Veteran Member
                      Posts: 1127
                      Veteran Member
                        Infor provides free samples for the ION BODs processing. Look for a Sync_ prefix when downloading from within IPA. If you can't find, then email me and I'll shoot one to you. david@consultdavidw.com
                        David Williams
                        You are not authorized to post a reply.