/** * Function createXmlNode: Creates an Xml_Node object storing * the data of $this Xml_Field. * * @author David S. Callizaya S. <*****@*****.**> * @access public * @return Xml_Node */ public function createXmlNode($includeDefaultValues = false) { /* Start Comment: Creates the corresponding XML Tag for $this * object. */ $attributesList = $this->getXmlAttributes($includeDefaultValues); $node = new Xml_Node($this->name, 'open', $this->sql, $attributesList); /* End Comment */ /* Start Comment: Creates the languages nodes and options * if exist. */ $node->addChildNode(new Xml_Node('', 'cdata', "\n")); $node->addChildNode(new Xml_Node($this->language, 'open', $this->label)); if (isset($this->option)) { foreach ($this->option as $k => $v) { $node->children[1]->addChildNode(new Xml_Node('option', 'open', $v, array('name' => $k))); } } /* End Comment */ return $node; }