www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to pull payloadID and timestamp from cXML using PHP

  1. #1
    Join Date
    Feb 2011
    Posts
    2

    How to pull payloadID and timestamp from cXML using PHP

    Hey all,

    We (my boss) would like to pull the payloadID and timestamp from incoming cXML orders for injection into our MySQL database. The code to inject the information is already complete and working, and I am able to pull information from tags and attributes within the XML, however I don't seem to be able to pull any information from within the <cXML> tag itself.

    Here's an example of the cXML tag:

    Code:
    <cXML payloadID="systemgeneratedpayloadid" timestamp="timestamp" version="1.2.021" xml:lang="en-US">
    The XML is set up as follows:

    PHP Code:
    foreach($this->simpleXML as $url
    And here are some examples of how the information that works is pulled in the same function:

    PHP Code:
    $item[4] = $url->OrderRequest->OrderRequestHeader['orderID'];  #Attribute from tag
    $NetworkID $url->From->Credential->Identity;   #XML data 
    I have tried to pull the payloadID and timestamp like so without results:

    PHP Code:
    $item[8] = $url->cXML['payloadID']; 
    Anyone have any suggestions? Your help would be greatly appreciated.

    Thanks,

    Eric

  2. #2
    Join Date
    Feb 2011
    Posts
    2
    Hmmm not too much activity here lol. I just wanted to post that I have figured this one out and no longer need assistance.

    Thanks,

    Eric

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles