Results 1 to 4 of 4

Thread: Reading XML

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2016
    Posts
    21

    Reading XML

    I am trying to create a CRM plugin to read this xml data.


    what I am interested in is looping through the PaymentFile tag to extract the data to variables. i.e get the value of Index and userNumber .. do something with that then get the next index and userNumver values Etc I have cut this example short, but there could be anywhere from 1 to 3000 records in this xml file

    Code:
    <?xml version="1.0" ?>
    <SubmissionResults xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" status="complete" submissionIdentifier="1539163533409qFdTb9FGn" submissionType="live" submissionSerialNumber="005928" submissionDateAndTime="Wed Oct 10 10:25:37 BST 2018" submissionEarliestDate="2018-10-11" xmlns="http://bacs.co.uk/submissions">
     <SubmittingServiceUser userNumber="ABCDEF" name="SOME COMPANY" />
     <SubmittingContact contactIdentifier="JOHN123" fullName="JOHN SMITH" />
     <SigningContact contactIdentifier="JOHN123" fullName="JOHN SMITH" />
     <PaymentFile status="complete" index="1" paymentFileIdentifier="499" processingDay="2018-10-11" currency="GBP" creditRecordCount="0" creditValueTotal="0" debitRecordCount="2" debitValueTotal="4200" ddiRecordCount="0" workCode="4 MULTI  ">
      <OriginatingServiceUser userNumber="123456" name="COMPANY 1" />
     </PaymentFile>
     <PaymentFile status="complete" index="2" paymentFileIdentifier="159" processingDay="2018-10-19" currency="GBP" creditRecordCount="0" creditValueTotal="0" debitRecordCount="29" debitValueTotal="665755" ddiRecordCount="0" workCode="4 MULTI  ">
      <OriginatingServiceUser userNumber="121212" name="COMPANY 2" />
     </PaymentFile>
    </SubmissionResults>
    Last edited by dday9; Oct 12th, 2018 at 08:33 AM. Reason: Added Code Tags

Posting Permissions

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



Click Here to Expand Forum to Full Width