menu

Codeigniter XML Helper


Codeigniter XML Helper – Codeigniter XML Helper contains function that is used to Convert String As a input to XML Characters.$this->load->helper(‘xml’); is used to load the helper. Here in this tutorial, we are going to explain how to use XML helper in CodeIgniter.


Codeigniter XML Helper Example

Let us first see how to load XML helper in codeigniter and then use its function-

Load XML Helper

How To Load XML Helper in Codeingniter Example:

Functions:-

Following function is available in codeigniter let us understand with example.

    • XML-converted string

    Syntax of XML-converted string function is

    Syntax of XML-converted string function is:-

      Parameters:

    • $str (string) : the text string to convert
    • $protect_all (bool) : Whether to protect all content that looks like a potential entity instead of just numbered entities, e.g. &foo;
    • Returns : XML-converted string
    • Return type : string

    EXAMPLE

    Here is simple example of XML-converted string.

    XML-converted string in Codeigniter Example:-

    This Helper Convert String As a Input To XML Characters

    The output will be like this –

    Codeigniter XML Helper