/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/tag_utils/xml_utils.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/tag_utils/xml_utils.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jonen, Thu Jan 30 03:29:41 2003 UTC revision 1.4 by jonen, Thu May 6 16:27:38 2004 UTC
# Line 17  Line 17 
17  /**  /**
18   * This is a simple wrapper function   * This is a simple wrapper function
19   * for building XMLTagClass objects   * for building XMLTagClass objects
20     *
21     * @tutorial XMLTagClass.cls#helper
22   *   *
23   * @param string - the xml tag name   * @param string - the xml tag name
24   * @param array - the name="value" pairs of   * @param array - the name="value" pairs of
# Line 26  Line 28 
28   *   *
29   * @return XMLTagClass object   * @return XMLTagClass object
30   */   */
31  function xml_tag($name, $attributes=array()) {  function &xml_tag($name, $attributes=array()) {
32          $tag = new XMLTagClass($name, $attributes);          $tag = new XMLTagClass($name, $attributes);
33      $num_args = func_num_args();      $num_args = func_num_args();
34          for ($i=2;$i<$num_args;$i++) {          for ($i=2;$i<$num_args;$i++) {
# Line 35  function xml_tag($name, $attributes=arra Line 37  function xml_tag($name, $attributes=arra
37          return $tag;          return $tag;
38  }  }
39    
40    /**
41     * This builds an xml tag, just as xml_tag() does,
42     * but turns on the auto wrapping of CDATA for the
43     * content for the tag.
44     *
45     * @param string - the xml tag name
46     * @param array - the name="value" pairs of
47     *                tag attributes
48     * @param mixed - any content that lives in the
49     *                PCDATA portion of the XML tag
50     *
51     * @return XMLTagClass object
52     */
53    function &xml_ctag($name, $attributes=array()) {
54        $args = func_get_args();
55        $tag =& call_user_func_array("xml_tag", $args);
56        $tag->set_cdata_flag(TRUE);
57        return $tag;
58    }
59    
60    
61  /**  /**
62   * This function is used to build a   * This function is used to build a

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed