Class xmltag

Description

The XML tag class. This class encapsulates the functionality of an XML tag. It can accept child classes, usually of the same class, which will be rendered as child XML elements. A whole XML hierarchy can thus be represented in a single xmltag object.

Located in /xml-defs.php (line 35)


	
			
Variable Summary
 mixed $attributes
 mixed $childtags
 mixed $encode_with
 mixed $tagname
 mixed $value
Method Summary
 xmltag xmltag ($name $name, [$value $value = ""], [mixed $encode_with = "cdata"])
 void childtag ($tag $tag)
 string render (mixed $indent)
 void setattribute ($name $name, $value $value)
Variables
mixed $attributes = array() (line 41)

Array of tag attributes

mixed $childtags = array() (line 43)

Array of child tags of this tag

mixed $encode_with = "cdata" (line 45)

If "cdata", we use CDATA to encode the value string

mixed $tagname (line 37)

Name of the XML tag

mixed $value (line 39)

Value of this XML tag

Methods
Constructor xmltag (line 51)

Constructor

xmltag xmltag ($name $name, [$value $value = ""], [mixed $encode_with = "cdata"])
  • $name $name: Name of this XML tag
  • $value $value: Optional value for this XML tag
childtag (line 70)

Add a child tag.

void childtag ($tag $tag)
  • $tag $tag: XMl tag object to add to this tag as a child
render (line 79)

Render the tag as XML.

  • return: The XML for this tag
string render (mixed $indent)
setattribute (line 63)

Set a tag attribute key=value pair.

void setattribute ($name $name, $value $value)
  • $name $name: Name of the tag attribute as in name="value"
  • $value $value: Value of the tag attribute

Documentation generated by phpDocumentor 1.3.0RC3