Exemple #1
0
 function toXMLString()
 {
     $sbReturnString = null;
     $nCount = null;
     $spParam = null;
     $spaAttribute = null;
     $sbString = null;
     $sbReturnString = '';
     $sbReturnString .= '<' . $this->getName();
     if ($this->m_lspaSOAPParamAttributeList != null) {
         for ($nCount = 0; $nCount < $this->m_lspaSOAPParamAttributeList->getCount(); $nCount++) {
             $spaAttribute = $this->m_lspaSOAPParamAttributeList->getAt($nCount);
             if ($spaAttribute != null) {
                 $sbString = '';
                 $sbString .= ' ' . $spaAttribute->getName() . '="' . SharedFunctions::replaceCharsInStringWithEntities($spaAttribute->getValue()) . '"';
                 $sbReturnString .= (string) $sbString;
             }
         }
     }
     if ($this->m_lspSOAPParamList->getCount() == 0 && $this->getValue() == '') {
         $sbReturnString .= ' />';
     } else {
         $sbReturnString .= '>';
         if ($this->getValue() != '') {
             $sbReturnString .= SharedFunctions::replaceCharsInStringWithEntities($this->getValue());
         }
         for ($nCount = 0; $nCount < $this->m_lspSOAPParamList->getCount(); $nCount++) {
             $spParam = $this->m_lspSOAPParamList->getAt($nCount);
             if ($spParam != null) {
                 $sbReturnString .= $spParam->toXMLString();
             }
         }
         $sbReturnString .= '</' . $this->getName() . '>';
     }
     return (string) $sbReturnString;
 }