The XML Helper file contains functions that assist in working with XML data.
This helper is loaded using the following code
$this->load->helper('xml');
The following functions are available:
xml_convert($str[, $protect_all = FALSE])
Parameters: |
|
---|---|
Returns: |
XML-converted string |
Return type: |
string |
Takes a string as input and converts the following reserved XML characters to entities:
This function ignores ampersands if they are part of existing numbered character entities, e.g. {. Example:
$string = '<p>Here is a paragraph & an entity ({).</p>'; $string = xml_convert($string); echo $string;
outputs:
<p>Here is a paragraph & an entity ({).</p>
© 2014–2016 British Columbia Institute of Technology
Licensed under the MIT License.
https://www.codeigniter.com/user_guide/helpers/xml_helper.html