Inheritance diagram for Xml:

Public Member Functions | |
| __construct ($input=null, $options=array()) | |
| __destruct () | |
| __initParser () | |
| addNamespace ($prefix, $url) | |
| compose ($options=array()) | |
| error ($msg, $code=0, $line=0) | |
| getError ($code) | |
| header ($attrib=array()) | |
| load ($input) | |
| & | next () |
| & | parent () |
| parse () | |
| & | previous () |
| removeNamespace ($prefix) | |
| resolveNamespace ($name, $url) | |
| toString ($options=array()) | |
Static Public Member Functions | |
| addGlobalNamespace ($name, $url=null) | |
| addGlobalNs ($name, $url=null) | |
| options ($options=array()) | |
| removeGlobalNamespace ($name) | |
| removeGlobalNs ($name) | |
Public Attributes | |
| $__file | |
| $__header = null | |
| $__parser | |
| $__rawData = null | |
| $__tags = array() | |
| $encoding = 'UTF-8' | |
| $version = '1.0' | |
Definition at line 757 of file xml.php.
| Xml::__construct | ( | $ | input = null, |
|
| $ | options = array() | |||
| ) |
Constructor. Sets up the XML parser with options, gives it this object as its XML object, and sets some variables.
| mixed | $input The content with which this XML document should be initialized. Can be a string, array or object. If a string is specified, it may be a literal XML document, or a URL or file path to read from. | |
| array | $options Options to set up with, valid options are as follows:
|
Definition at line 833 of file xml.php.
References __construct(), XmlNode::createNode(), XmlNode::document(), and options().
| Xml::__destruct | ( | ) |
| Xml::__initParser | ( | ) |
| Xml::addGlobalNamespace | ( | $ | name, | |
| $ | url = null | |||
| ) | [static] |
Alias to Xml::addNs
public
Definition at line 1148 of file xml.php.
References $url, and addGlobalNs().
| Xml::addGlobalNs | ( | $ | name, | |
| $ | url = null | |||
| ) | [static] |
Adds a namespace to any XML documents generated or parsed
| string | $name The namespace name | |
| string | $url The namespace URI; can be empty if in the default namespace map |
Definition at line 1112 of file xml.php.
References $url, XmlManager::getInstance(), and resolveNamespace().
Referenced by addGlobalNamespace(), and XmlNode::addNamespace().
| Xml::addNamespace | ( | $ | prefix, | |
| $ | url | |||
| ) |
| Xml::compose | ( | $ | options = array() |
) |
Returns a string representation of the XML object
| mixed | $options If boolean: whether to include the XML header with the document (defaults to true); if an array, overrides the default XML generation options |
| Xml::error | ( | $ | msg, | |
| $ | code = 0, |
|||
| $ | line = 0 | |||
| ) |
If debug mode is on, this method echoes an error message.
| string | $msg Error message | |
| integer | $code Error code | |
| integer | $line Line in file public |
Definition at line 968 of file xml.php.
References debug(), and Configure::read().
| Xml::getError | ( | $ | code | ) |
| Xml::header | ( | $ | attrib = array() |
) |
| Xml::load | ( | $ | input | ) |
Initialize XML object from a given XML string. Returns false on error.
| string | $input XML string, a path to a file, or an HTTP resource to load |
Definition at line 870 of file xml.php.
References App::import().
| & Xml::next | ( | ) |
| Xml::options | ( | $ | options = array() |
) | [static] |
Sets/gets global XML options
| array | $options |
Definition at line 1194 of file xml.php.
References XmlManager::getInstance().
Referenced by __construct(), XmlTextNode::toString(), toString(), and XmlNode::toString().
| & Xml::parent | ( | ) |
| Xml::parse | ( | ) |
Parses and creates XML nodes from the __rawData property.
Definition at line 899 of file xml.php.
References a().
| & Xml::previous | ( | ) |
| Xml::removeGlobalNamespace | ( | $ | name | ) | [static] |
| Xml::removeGlobalNs | ( | $ | name | ) | [static] |
Removes a namespace added in addNs()
| string | $name The namespace name or URI public |
Definition at line 1158 of file xml.php.
References XmlManager::getInstance().
Referenced by removeGlobalNamespace(), and XmlNode::removeNamespace().
| Xml::removeNamespace | ( | $ | prefix | ) |
| Xml::resolveNamespace | ( | $ | name, | |
| $ | url | |||
| ) |
Resolves current namespace
| string | $name | |
| string | $url |
Definition at line 1127 of file xml.php.
References $url, and XmlManager::getInstance().
Referenced by addGlobalNs().
| Xml::toString | ( | $ | options = array() |
) |
1.4.7