doubledee Posted April 4, 2011 Share Posted April 4, 2011 Can someone please explain WHAT this code is and HOW it works? (Duh! Obviously it is manipulating XML, however I don't know what function or whatever is doing the legwork?!) $xmlStr .= xmlNode("xxxTransType", "00"); $xmlStr .= xmlNode("MerchantNumber", $merchantNumber); $xmlStr .= xmlNode("Products", $Products); $xmlStr .= xmlNode("xxxName", $xxxName); $xmlStr .= xmlNode("xxxCompany", $xxxCompany); $xmlStr .= xmlNode("xxxAddress", $xxxAddress); Thanks, Debbie Quote Link to comment https://forums.phpfreaks.com/topic/232618-question-about-xmlnode-code/ Share on other sites More sharing options...
salathe Posted April 4, 2011 Share Posted April 4, 2011 Can someone please explain WHAT this code is and HOW it works? The xmlNode function being used is not part of PHP by default. Somewhere else in your script it will have been defined (function xmlNode(...)), without seeing that definition we cannot do anything other than guess what it is and how it works. It looks like the function might take a node name and a value, and return those as an XML element. For example, xmlNode("cake", "carrot") might return <cake>carrot</cake>. Quote Link to comment https://forums.phpfreaks.com/topic/232618-question-about-xmlnode-code/#findComment-1196556 Share on other sites More sharing options...
doubledee Posted April 4, 2011 Author Share Posted April 4, 2011 Can someone please explain WHAT this code is and HOW it works? The xmlNode function being used is not part of PHP by default. Somewhere else in your script it will have been defined (function xmlNode(...)), without seeing that definition we cannot do anything other than guess what it is and how it works. It looks like the function might take a node name and a value, and return those as an XML element. For example, xmlNode("cake", "carrot") might return <cake>carrot</cake>. Okay, thanks, I'll go track down that supposed function then. Debbie Quote Link to comment https://forums.phpfreaks.com/topic/232618-question-about-xmlnode-code/#findComment-1196647 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.