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

Link to comment
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>.

 

Okay, thanks, I'll go track down that supposed function then.

 

 

Debbie

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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