--- nfo/php/libs/com.newsblob.phphtmllib/tag_utils/xml_utils.inc 2003/02/22 21:08:09 1.2
+++ nfo/php/libs/com.newsblob.phphtmllib/tag_utils/xml_utils.inc 2003/09/20 00:15:57 1.3
@@ -5,7 +5,7 @@
* for things related to XMLTagClass
* objects/data
*
- * $Id: xml_utils.inc,v 1.2 2003/02/22 21:08:09 jonen Exp $
+ * $Id: xml_utils.inc,v 1.3 2003/09/20 00:15:57 jonen Exp $
*
* @author Walter A. Boring IV
* @package phpHtmlLib
@@ -26,7 +26,7 @@
*
* @return XMLTagClass object
*/
-function xml_tag($name, $attributes=array()) {
+function &xml_tag($name, $attributes=array()) {
$tag = new XMLTagClass($name, $attributes);
$num_args = func_num_args();
for ($i=2;$i<$num_args;$i++) {
@@ -35,6 +35,26 @@
return $tag;
}
+/**
+ * This builds an xml tag, just as xml_tag() does,
+ * but turns on the auto wrapping of CDATA for the
+ * content for the tag.
+ *
+ * @param string - the xml tag name
+ * @param array - the name="value" pairs of
+ * tag attributes
+ * @param mixed - any content that lives in the
+ * PCDATA portion of the XML tag
+ *
+ * @return XMLTagClass object
+ */
+function &xml_ctag($name, $attributes=array()) {
+ $args = func_get_args();
+ $tag =& call_user_func_array("xml_tag", $args);
+ $tag->set_cdata_flag(TRUE);
+ return $tag;
+}
+
/**
* This function is used to build a