Ejemplo n.º 1
0
 /**
  * Convert an Array to XML
  * @param string $node_name - name of the root node to be converted
  * @param array $arr - aray to be converterd
  * @return DomDocument
  */
 public static function &createXML($node_name, $arr = array())
 {
     $xml = self::getXMLRoot();
     $xml->appendChild(self::convert($node_name, $arr));
     self::$xml = null;
     // clear the xml node in the class for 2nd time use.
     return $xml;
 }
Ejemplo n.º 2
0
 /**
  * Return the xml string built that we are about to send over to the api
  * @return string
  */
 protected function getXMLString()
 {
     // Add in the defaults
     $postFields = array('@attributes' => array('USERID' => $this->username));
     // Add in the sub class data
     $postFields = array_merge($postFields, $this->getPostFields());
     $xml = IWD_XMLParser::createXML($this->apiCodes[$this->apiVersion], $postFields);
     return $xml->saveXML();
 }