Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Code outputting odd XML

$
0
0
  1. So here is the code: About 99% of the time it returns the XML listed under "Good Return" but almost randomly it is returning the code under "Bad Return". I echoed out all of the $ToID's and there is no weirdness (Only long integers)
  2.  
  3. foreach ($xml->result->Accounts->row as $a) {
  4.  
  5. $ToID = (String) $a->FL[0];
  6. $FromData = (String) $a->FL[1];
  7. $ToXML .= '<row no="' . $UpdateCount . '">';
  8. $ToXML .= '<FL val="Id">' . $ToID . '</FL>';
  9. $ToXML .= '<FL val="' . $ToField . '">' . $this->FixID($FromData) . '</FL>';
  10. $ToXML .= "</row>";
  11. $UpdateCount+=1;
  12. $TotalUpdateCount+=1;
  13. echo "$ToID <br>"; //For debugging
  14. }
  15.  
  16. ---- Bad Return (Its missing a < after ID)
  17.  
  18. <row no="162">
  19. <FL val="Id">1058030000000072643/FL><FL val="MemberCode">Firms.338</FL>
  20. </row>
  21. ---- End bad return
  22.  
  23. ---- Good Return
  24. <row no="163">
  25. <FL val="Id">1058030000000072642</FL>
  26. <FL val="MemberCode">Firms.337</FL>
  27. </row>
  28. ---- End good return

Viewing all articles
Browse latest Browse all 13200

Trending Articles