Jump to content

Question about xmlNode code


doubledee

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/232618-question-about-xmlnode-code/
Share on other sites

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>.

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.